本文整理汇总了C#中DataFieldCollection.Add方法的典型用法代码示例。如果您正苦于以下问题:C# DataFieldCollection.Add方法的具体用法?C# DataFieldCollection.Add怎么用?C# DataFieldCollection.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DataFieldCollection
的用法示例。
在下文中一共展示了DataFieldCollection.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: InterfaceInclude
private void InterfaceInclude()
{
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(INTERACAOQD._CHA_ID, txtCHA_ID.Text);
lFields.Add(INTERACAOQD._INT_REGDATE, DateTime.Now);
lFields.Add(INTERACAOQD._INT_REGUSER, "USER");
lFields.Add(INTERACAOQD._INT_STATUS, "A");
lReturn = INTERACAOTo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
MessageBox1.wuc_ShowMessage("Registro salvo com sucesso.", 1);
//LoadGrid();
Clear();
}
}
catch (WebManagerException e)
{
e.TratarExcecao(true);
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(true);
}
}
示例2: btnSim_Click
protected void btnSim_Click(object sender, EventArgs e)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lreturn = new OperationResult();
try
{
lFields.Add(DEFENSORITINERANCIAQD._DEF_ID, ddlDefensores.SelectedValue);
lFields.Add(DEFENSORITINERANCIAQD._DEFI_DISPOSICAO, rblItinerancia.SelectedValue);
lFields.Add(DEFENSORITINERANCIAQD._DEFI_USUARIOS, Session["_SessionUser"].ToString());
lFields.Add(DEFENSORITINERANCIAQD._DEFI_REGDATE, DateTime.Now);
lFields.Add(DEFENSORITINERANCIAQD._DEFI_STATUS, "A");
lreturn = DEFENSORITINERANCIADo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lreturn.IsValid)
{
Exception exc = new Exception(lreturn.OperationException.Message.ToString());
throw exc;
}
else
{
MessageBox1.wuc_ShowMessage("Registro efetuado com sucesso!", 1);
LoadDefensor();
}
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(true);
}
}
示例3: grdMain_RowCommand
protected void grdMain_RowCommand(object sender, GridViewCommandEventArgs e)
{
try
{
if (e.CommandName != "Page") //Paginação
{
int iIndice = (((GridView)sender).PageIndex * ((GridView)sender).PageSize) + int.Parse(e.CommandArgument.ToString());
if (e.CommandName == "Receber")
{
DataTable lRelatorios = (DataTable)ViewState["WRK_TABLE"];
if (lRelatorios.Rows.Count > 0)
{
DataTable lImagem = CORREGEDORIAIMGDo.GetCORREGEDORIAIMGByID(lRelatorios.Rows[iIndice]["CGDR_ID"].DBToDecimal(), LocalInstance.ConnectionInfo);
Session["_CGDR_ID_"] = lRelatorios.Rows[iIndice]["CGDR_ID"].DBToDecimal();
////System.IO.FileStream wFile;
////byte[] byteData = null;
////byteData = (byte[])lImagem.Rows[0][CORREGEDORIAIMGQD._CGDR_IMG.Name];
////wFile = new FileStream("c:\\" + lRelatorios.Rows[iIndice]["PES_NOME"].ToString() + "_" + lRelatorios.Rows[iIndice][CORREGEDORIAIMGQD._CGDR_NOME.Name].ToString(), FileMode.Append);
////wFile.Write(byteData, 0, byteData.Length);
////wFile.Close();
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(CORREGEDORIAIMGQD._CGDR_ID, lRelatorios.Rows[iIndice]["CGDR_ID"].DBToDecimal());
lFields.Add(CORREGEDORIAIMGQD._CGDR_SIT, 1);
lReturn = CORREGEDORIAIMGDo.Update(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
LoadGrid();
}
}
}
}
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(true);
}
}
示例4: btnDevolver_Click
protected void btnDevolver_Click(object sender, EventArgs e)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
hidRetornarSetor.Value = "true";
try
{
string lTramitacaoAnterior = string.Empty;
lFields.Add(TRAMITACAOQD._TRA_ID, hidTRA_ID.Value);
lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
lFields.Add(TRAMITACAOQD._TRA_REGUSER, Session["_SessionUser"].ToString());
lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");
lFields.Add(TRAMITACAOQD._SPED_ID, "5");
lFields.Add(TRAMITACAOQD._TRA_OBSERVACAO, txtObservacaoTeste.Text);
lReturn = TRAMITACAOTo.Update(lFields, LocalInstance.ConnectionInfo);
exibirMensagem("Mensagem", "Diaria devolvida com sucesso", "ok", "AcompanharPedidoPlanejamento.aspx");
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(false);
}
}
示例5: btnAceitar_Click
protected void btnAceitar_Click(object sender, EventArgs e)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
try
{
lFields.Add(RELATORIOVIAGEMQD._RELVIA_ID, lobRELVIA_ID);
lFields.Add(RELATORIOVIAGEMQD._RELVIA_REGDATE, DateTime.Now);
lFields.Add(RELATORIOVIAGEMQD._RELVIA_REGUSER, Session["_SessionUser"].ToString());
lFields.Add(RELATORIOVIAGEMQD._RELVIA_STATUS, "A");
lFields.Add(RELATORIOVIAGEMQD._RELVIA_FINAN, "OK");
lReturn = RELATORIOVIAGEMTo.Update(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception ee = new Exception(lReturn.OperationException.Message.ToString());
throw ee;
}
string jscript = "";
jscript +=
"window.opener.location.reload('../Aut/Admin/AcompanharPedidofinanceiro.aspx');";
ScriptManager.RegisterClientScriptBlock(this, this.GetType(), "refreshPageAnterior", jscript, true);
ClientScript.RegisterStartupScript(typeof(Page), "closePage", "window.close();", true);
}
catch (WebManagerException wex)
{
wex.TratarExcecao(true);
}
catch (Exception ee)
{
(new UnknownException(ee)).TratarExcecao(true);
}
}
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:40,代码来源:RelatorioViagemVisualizacaoFINAN.aspx.cs
示例6: btnScpjNovo_Click
protected void btnScpjNovo_Click(object sender, EventArgs e)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(LOGDEFNETQD._LOGDEF_PAGINA, "SCPJ NOVO");
lFields.Add(LOGDEFNETQD._LOGDEF_USUARIO, Session["_SessionUser"].ToString());
lFields.Add(LOGDEFNETQD._LOGDEF_REGDATE, DateTime.Now);
lFields.Add(LOGDEFNETQD._LOGDEF_STATUS, "A");
lReturn = LOGDEFNETDo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
Response.Redirect(lLinkNovo);
}
}
示例7: btnIndeferir_Click
protected void btnIndeferir_Click(object sender, EventArgs e)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
try
{
if (btnIndeferir.Text == "INDEFERIR")
{
txtOBS.Visible = true;
btnIndeferir.Text = "CONFIRMAR INDEFERIMENTO";
}
else
{
string lTramitacao = string.Empty;
txtOBS.Visible = false;
btnIndeferir.Text = "INDEFERIR";
lTramitacao = hidTRA_ID.Value;
lFields.Add(TRAMITACAOQD._TRA_ID, lTramitacao);
lFields.Add(TRAMITACAOQD._SPED_ID, "4");
lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
lFields.Add(TRAMITACAOQD._TRA_REGUSER, Session["_SessionUser"].ToString());
lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");
lFields.Add(TRAMITACAOQD._TRA_OBSERVACAO, txtOBS.Text);
lReturn = TRAMITACAOTo.Update(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception ee = new Exception(lReturn.OperationException.Message);
throw ee;
}
btnImprimir.Visible = false;
PanelDadosDiaria.Visible = false; //lobao
grvDestinacao.Visible = false;
grvPROPOSTO.Visible = false;
dvPropostos.Visible = false;
dvPedidos.Visible = true;
dvGPPARAFUNDOS.Visible = false;
DivDadosSuprimentoFundos.Visible = false;
LoadGridPlanejDeferido();
LoadGridPlanejIndeferido();
LoadGridPlanejTramitando();
LoadTabs();
}
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(false);
}
}
示例8: InterfaceInsert
private void InterfaceInsert()
{
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
LoginUserDo oUsuario = (LoginUserDo)Session["UsuarioAtual"];
lFields.Add(MUNICIPIOQD._CID_ID, hfMunId.Value);
lFields.Add(MUNICIPIOQD._MUN_ENDERECO, txtEndCorreto.Value);
lFields.Add(MUNICIPIOQD._MUN_LATITUDE, txtLatitude.Value);
lFields.Add(MUNICIPIOQD._MUN_LOGINTUDE, txtLongitude.Value);
lFields.Add(MUNICIPIOQD._MUN_CONTATO, txtContato.Value);
lFields.Add(MUNICIPIOQD._MUN_COMPETENCIA, txtCompetencia.Value);
lFields.Add(MUNICIPIOQD._MUN_REGDATE, DateTime.Now);
lFields.Add(MUNICIPIOQD._MUN_USUARIO, oUsuario.LoginName);
lFields.Add(MUNICIPIOQD._MUN_STATUS, "A");
lReturn = MUNICIPIODo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
exibirMensagem("Erro", err.Message, "erro");
}
else
{
Response.Redirect("GerNucleo.aspx?r=OK&n=" + hfMunId.Value + "");
}
}
catch (Exception err)
{
exibirMensagem("Erro", err.Message, "erro");
}
}
示例9: InterfaceUpdateSystemUser
private void InterfaceUpdateSystemUser(decimal pPES_ID, string pStatus)
{
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(SystemUserQD._SUSR_ID, decimal.Parse(Session["Susr_Id"].ToString()));
if (pStatus == "A")
{
String lPASS = APB.Framework.Encryption.Crypto.Encode(txtSenha.Text);
lFields.Add(SystemUserQD._PES_ID, pPES_ID);
lFields.Add(SystemUserQD._SUSR_PASSWORD, lPASS);
}
lFields.Add(SystemUserQD._SUSR_REGDATE, DateTime.Now);
lFields.Add(SystemUserQD._SUSR_REGUSR, Session["UsuarioAtual"].ToString());
lFields.Add(SystemUserQD._SUSR_STATUS, pStatus);
lReturn = SystemUserDo.Update(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
exibirMensagem("Alerta", " Registro salvo com sucesso.", "ok", "MudarSenha.aspx");
}
}
catch (Exception err)
{
exibirMensagem( "Erro", err.Message.ToString(), "erro");
}
}
示例10: TramitacaoInclude
private void TramitacaoInclude()
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lreturn = new OperationResult();
try
{
DataTable lTableSetor = SETORTo.GetSEQUENCIAORGANOGRAMAbyTramitacao(LocalInstance.ConnectionInfo, hidTRA_ID.Value);
string lProxProx = "", lProxSeqOrg = "";
if (lTableSetor.Rows.Count > 0)
{
lProxSeqOrg = lTableSetor.Rows[0]["SORG_IDCORRESPONDENTE"].ToString();
lProxProx = lTableSetor.Rows[0]["PROXIMO"].ToString();
}
lFields.Add(TRAMITACAOQD._SORG_ID, lProxSeqOrg);
if (lProxProx.Length > 0)
lFields.Add(TRAMITACAOQD._SPED_ID, 1);
else
lFields.Add(TRAMITACAOQD._SPED_ID, 3);
lFields.Add(TRAMITACAOQD._DOC_ID, hidDOC_ID.Value);
lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
lFields.Add(TRAMITACAOQD._TRA_REGUSER, "USER");
lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");
lreturn = TRAMITACAOTo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lreturn.IsValid)
{
Exception exc = new Exception(lreturn.OperationException.Message.ToString());
throw exc;
}
}
catch (WebManagerException wex)
{
wex.TratarExcecao(true);
}
catch (Exception e)
{
(new UnknownException(e)).TratarExcecao(true);
}
}
示例11: SalvarPeticaoNew
private void SalvarPeticaoNew()
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
try
{
lFields.Clear();
lFields.Add(PECASXNAAPQD._TPMN_ID, ddlTipoMateria.SelectedValue);
lFields.Add(PECASXNAAPQD._TPEN_ID, ddlTipoPeca.SelectedValue);
lFields.Add(PECASXNAAPQD._PECN_TAGS, limparNome(txtTags.Text.ToUpper()));
lFields.Add(PECASXNAAPQD._PECN_EMENTA, limparNome(txtEmenta.Text.ToUpper()));
lFields.Add(PECASXNAAPQD._PECN_TEXTO, ftbPeticao.Text);
lFields.Add(PECASXNAAPQD._PECN_REGDATE, DateTime.Now);
lFields.Add(PECASXNAAPQD._PECN_STATUS, "A");
lFields.Add(PECASXNAAPQD._PECN_USUARIO, hfUsuario.Value);
lReturn = PECASXNAAPDo.Insert(lFields, LocalInstance.ConnectionInfo);
if (lReturn.IsValid)
{
hfPetNumero.Value = lReturn.SequenceControl.ToString();
string Numero = DateTime.Now.Month + "0" + hfPetNumero.Value;
string pPETN_NUMERO = "PECN" + Numero.PadLeft(11, '0') + "/" + DateTime.Now.Year.ToString();
lFields.Clear();
lFields.Add(PECASXNAAPQD._PECN_ID, hfPetNumero.Value);
lFields.Add(PECASXNAAPQD._PECN_NUMERO, pPETN_NUMERO);
lFields.Add(PECASXNAAPQD._PECN_REGDATE, DateTime.Now);
lFields.Add(PECASXNAAPQD._PECN_STATUS, "A");
lFields.Add(PECASXNAAPQD._PECN_USUARIO, hfUsuario.Value);
lReturn = PECASXNAAPDo.Update(lFields, LocalInstance.ConnectionInfo, "UPER");
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
MessageBox1.wuc_ShowMessage(err.ToString(), 3);
}
else
{
MessageBox1.wuc_ShowMessage("Peça Cadastrada com Sucesso. O número da peça cadastrada é " + pPETN_NUMERO, 1);
LimpaCampos();
}
}
else
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
MessageBox1.wuc_ShowMessage(err.ToString(), 3);
}
}
catch (Exception err)
{
MessageBox1.wuc_ShowMessage(err.ToString(), 3);
}
}
示例12: TramitacaoInclude
private void TramitacaoInclude(string pSetorOri, decimal pDoc_id)
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lreturn = new OperationResult();
string lSeqOrg;
try
{
lSeqOrg = SETORTo.GetSEQUENCIAORGANOGRAMA_PRESTACAObySETOR(LocalInstance.ConnectionInfo, "N", pSetorOri);
lFields.Add(TRAMITACAOQD._SORG_ID, lSeqOrg);
//lFields.Add(TRAMITACAOQD._SET_IDDESTINO, lSetorDest);
lFields.Add(TRAMITACAOQD._SPED_ID, 1);
lFields.Add(TRAMITACAOQD._DOC_ID, hidDOC_ID.Value);
lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
lFields.Add(TRAMITACAOQD._TRA_REGUSER, "USER");
lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");
lreturn = TRAMITACAOTo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lreturn.IsValid)
{
Exception exc = new Exception(lreturn.OperationException.Message.ToString());
throw exc;
}
}
catch (WebManagerException wex)
{
wex.TratarExcecao(true);
}
catch (Exception e)
{
(new UnknownException(e)).TratarExcecao(true);
}
}
示例13: InterfaceIncludePrestacaoNotaFiscal
private void InterfaceIncludePrestacaoNotaFiscal()
{
decimal ID = 0;
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(PrestacaoxNotaFiscalQD._PRES_ID, Session["PRES_ID"].ToString());
lFields.Add(PrestacaoxNotaFiscalQD._PRESNOT_DATA, DateTime.Now);
lFields.Add(PrestacaoxNotaFiscalQD._PRESNOT_REGDATE, DateTime.Now);
lFields.Add(PrestacaoxNotaFiscalQD._PRESNOT_REGUSER, "USER");
lFields.Add(PrestacaoxNotaFiscalQD._PRESNOT_STATUS, "A");
lReturn = PrestacaoxNotaFiscalTo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
ID = lReturn.SequenceControl;
InterfaceIncludeNotaFiscal(ID);
string lSetorOri = (string)Session["_SessionSetor"];
TramitacaoInclude(lSetorOri, decimal.Parse(hidDOC_ID.Value));
MessageBox1.wuc_ShowMessage("Prestação Realizada com sucesso. Aguarde a proxima janela aparecer com o demonstrativo da receita e da espesa.",
"AutDefault.aspx", "Reports/LoadReport.aspx?ReportName=SFReceitaDespesa.rpt", 1);
Session["PRES_ID"] = null;
Session["DOC_ID"] = null;
Session["KEY_ID"] = null;
}
}
catch (WebManagerException e)
{
e.TratarExcecao(true);
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(true);
}
}
示例14: InterfaceIncludeFigura
private decimal InterfaceIncludeFigura(byte[] IMG)
{
decimal ID = 0;
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
lFields.Add(FIGURASQD._FIG_IMAGEN, IMG);
lFields.Add(FIGURASQD._FIG_NOME, "FIGURA");
lFields.Add(FIGURASQD._FIG_FORMATO, ".jpg");
lFields.Add(FIGURASQD._FIG_TAMANHO, IMG);
lFields.Add(FIGURASQD._FIG_REGDATE, DateTime.Now);
lFields.Add(FIGURASQD._FIG_REGUSER, "USER");
lFields.Add(FIGURASQD._FIG_STATUS, "A");
lReturn = FIGURASTo.Insert(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception err = new Exception(lReturn.OperationException.Message.ToString());
throw err;
}
else
{
ID = lReturn.SequenceControl;
}
}
catch (WebManagerException e)
{
e.TratarExcecao(true);
}
catch (Exception err)
{
(new UnknownException(err)).TratarExcecao(true);
}
return ID;
}
示例15: TramitacaoUpdate
private void TramitacaoUpdate()
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
try
{
lFields.Add(TRAMITACAOQD._TRA_ID, hidTRA_ID.Value);
lFields.Add(TRAMITACAOQD._SPED_ID, "3");
lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
lFields.Add(TRAMITACAOQD._TRA_REGUSER, Session["_SessionUser"].ToString());
lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");
lReturn = TRAMITACAOTo.Update(lFields, LocalInstance.ConnectionInfo);
if (!lReturn.IsValid)
{
Exception e = new Exception(lReturn.OperationException.Message.ToString());
throw e;
}
else
{
TramitacaoInclude();
}
}
catch (WebManagerException wex)
{
wex.TratarExcecao(true);
}
catch (Exception e)
{
(new UnknownException(e)).TratarExcecao(true);
}
}