本文整理汇总了C#中DataFieldCollection类的典型用法代码示例。如果您正苦于以下问题:C# DataFieldCollection类的具体用法?C# DataFieldCollection怎么用?C# DataFieldCollection使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
DataFieldCollection类属于命名空间,在下文中一共展示了DataFieldCollection类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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);
}
}
示例2: From
public static DataSet From(ConnectionInfo pInfo, string pSelectQuery, DataFieldCollection pConditionalParameters)
{
DataBase lDB;
Transaction lTransaction = null;
DataSet lReturn = new DataSet();
try
{
lDB = Instance.CreateDatabase(pInfo);
lTransaction = new Transaction(lDB);
lReturn = From(lTransaction, pSelectQuery, pConditionalParameters);
lTransaction.Commit();
}
catch (Exception lException)
{
if (lTransaction != null)
lTransaction.Rollback();
throw lException;
}
return lReturn;
}
示例3: Insert
public static OperationResult Insert(DataFieldCollection pValues, ConnectionInfo pInfo)
{
Transaction lTransaction;
lTransaction = new Transaction(Instance.CreateDatabase(pInfo));
bool lLocalTransaction = (lTransaction != null);
InsertCommand lInsert;
OperationResult lReturn = new OperationResult(PORT_BANNERQD.TableName, PORT_BANNERQD.TableName);
if (!lReturn.HasError){
try{
if (lLocalTransaction){
lReturn.Trace("Transação local, instanciando banco...");
}
lInsert = new InsertCommand(PORT_BANNERQD.TableName);
lReturn.Trace("Adicionando campos ao objeto de insert");
foreach (DataField lField in pValues.Keys){
lInsert.Fields.Add(lField.Name, pValues[lField], (ItemType)lField.DBType);
}
decimal lSequence;
lSequence = DataBaseSequenceControl.GetNext(pInfo, "BAN_ID");
lInsert.Fields.Add(PORT_BANNERQD._BAN_ID.Name, lSequence, (ItemType)PORT_BANNERQD._BAN_ID.DBType);
lReturn.Trace("Executando o Insert");
lInsert.Execute(lTransaction, false);
if (!lReturn.HasError){
if (lLocalTransaction){
if (!lReturn.HasError){
lReturn.Trace("Insert finalizado, executando commit");
lTransaction.Commit();
}
else{
lTransaction.Rollback();
}
}
}
else{
if (lLocalTransaction)
lTransaction.Rollback();
}
}
catch (Exception ex){
lReturn.OperationException = new SerializableException(ex);
if (lLocalTransaction)
lTransaction.Rollback();
}
}
return lReturn;
}
示例4: 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);
}
}
示例5: 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);
}
}
示例6: BaseRowAdapter
public BaseRowAdapter(TableName tname, Locator locator)
{
this.columns = new ColumnAdapterCollection();
this.fields = new DataFieldCollection();
this.tableName = tname;
this.locator = locator;
}
示例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: TableAdapter
public TableAdapter(DataTable dataTable, TableName tableName, Locator locator)
{
this.dataTable = dataTable;
this.tableName = tableName;
this.locator = locator;
this.columns = new ColumnAdapterCollection();
this.fields = new DataFieldCollection();
}
示例9: Update
public static OperationResult Update(DataFieldCollection pValues, ConnectionInfo pInfo) {
OperationResult lReturn = null;
if (pInfo.BridgeMode == (int)BridgeMode.Internal){
lReturn = PORT_BANNERDo.Update(pValues, pInfo);
}
else{
// Chamada do WebServices
}
return lReturn;
}
示例10: 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);
}
}
示例11: InterfaceLocalidade
private void InterfaceLocalidade()
{
try
{
DataFieldCollection lFields = new DataFieldCollection();
OperationResult lReturn = new OperationResult();
LoginUserDo oUsuario = (LoginUserDo)Session["UsuarioAtual"];
if (hfNucLoc.Value == "")
{
lFields.Add(NucleoxLocalidadeQD._NUC_ID, hfNucId.Value);
lFields.Add(NucleoxLocalidadeQD._CID_ID, ddlLocalidade.SelectedValue);
lFields.Add(NucleoxLocalidadeQD._BRR_ID, "0");
lFields.Add(NucleoxLocalidadeQD._NUCLOC_REGDATE, DateTime.Now);
lFields.Add(NucleoxLocalidadeQD._NUCLOC_REGUSER, oUsuario.LoginName);
lFields.Add(NucleoxLocalidadeQD._NUCLOC_STATUS, "A");
lReturn = NucleoxLocalidadeDo.Insert(lFields, LocalInstance.ConnectionInfo);
}
else
{
lFields.Add(NucleoxLocalidadeQD._NUCLOC_ID, hfNucLoc.Value);
lFields.Add(NucleoxLocalidadeQD._NUC_ID, hfNucId.Value);
lFields.Add(NucleoxLocalidadeQD._CID_ID, ddlLocalidade.SelectedValue);
lFields.Add(NucleoxLocalidadeQD._NUCLOC_REGDATE, DateTime.Now);
lFields.Add(NucleoxLocalidadeQD._NUCLOC_REGUSER, oUsuario.LoginName);
lFields.Add(NucleoxLocalidadeQD._NUCLOC_STATUS, "A");
lReturn = NucleoxLocalidadeDo.Update(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=" + hfNucId.Value + "");
}
}
catch (Exception err)
{
exibirMensagem("Erro", err.Message, "erro");
}
}
示例12: Insert
public static OperationResult Insert(
DataFieldCollection pValues,
ConnectionInfo pInfo
)
{
OperationResult lReturn = null;
if (pInfo.BridgeMode == (int)BridgeMode.Internal)
{
lReturn = Biblioteca_itememprestimoDo.Insert(pValues, pInfo);
}
else
{
// Chamada do WebServices
}
return lReturn;
}
示例13: Insert
public static OperationResult Insert(
DataFieldCollection pValues,
ConnectionInfo pInfo
)
{
OperationResult lReturn = null;
if (pInfo.BridgeMode == (int)BridgeMode.Internal)
{
lReturn = PrestacaoFundoFiguraDo.Insert(pValues, pInfo);
}
else
{
// Chamada do WebServices
}
return lReturn;
}
示例14: Insert
public static OperationResult Insert(
DataFieldCollection pValues,
ConnectionInfo pInfo
)
{
OperationResult lReturn = null;
if (pInfo.BridgeMode == (int)BridgeMode.Internal)
{
lReturn = DESCCONTROLEINTERNODo.Insert(pValues, pInfo);
}
else
{
// Chamada do WebServices
}
return lReturn;
}
示例15: Insert
public static OperationResult Insert(
DataFieldCollection pValues,
ConnectionInfo pInfo
)
{
OperationResult lReturn = null;
if (pInfo.BridgeMode == (int)BridgeMode.Internal)
{
lReturn = VALORESMATERIALDETALHAMENTODo.Insert(pValues, pInfo);
}
else
{
// Chamada do WebServices
}
return lReturn;
}