• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# DefNet.OperationResult类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中APB.Mercury.DataObjects.DefNet.OperationResult的典型用法代码示例。如果您正苦于以下问题:C# OperationResult类的具体用法?C# OperationResult怎么用?C# OperationResult使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



OperationResult类属于APB.Mercury.DataObjects.DefNet命名空间,在下文中一共展示了OperationResult类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: 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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:27,代码来源:AcompanharPedidoPlanejamento.aspx.cs


示例2: 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;
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_PORTAL,代码行数:60,代码来源:PORT_BANNERDo.cs


示例3: 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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:35,代码来源:INTERACAO.aspx.cs


示例4: 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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:58,代码来源:AcompanharPedidoPlanejamento.aspx.cs


示例5: 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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:51,代码来源:AnexoCorregedoriaDoc.aspx.cs


示例6: GetNext

        public static decimal GetNext(Transaction pTransaction, string pIDFieldValue)
        {
            decimal lID;

            // Inicializa operação
            OperationResult lReturn = new OperationResult(QueryDictionaries.SequencesQD.TableName, QueryDictionaries.SequencesQD.TableName);

            // Recupera Valor
            SelectCommand lSelectNext;

            string lSelectQuery = QueryDictionaries.SequencesQD.qSequencesMax;
            lSelectQuery += String.Format("WHERE {0} = >>{0}", QueryDictionaries.SequencesQD._SEQ_NAME.Name);

            object lScalarReturn;

            lSelectNext = new SelectCommand(lSelectQuery);

            // Passagem dos Valores de Parametros para a Clausula WHERE [comando SELECT]
            lSelectNext.Fields.Add(QueryDictionaries.SequencesQD._SEQ_NAME.Name, pIDFieldValue, ItemType.String);

            // Recupera Valor do Select (Seq_Value)
            lScalarReturn = lSelectNext.ReturnScalar(pTransaction);

            if (lScalarReturn == null || lScalarReturn == DBNull.Value) lScalarReturn = 1;
            lID = Convert.ToDecimal(lScalarReturn);

            // Altera Valor da Sequence
            UpdateCommand lUpdate;
            lUpdate = new UpdateCommand(QueryDictionaries.SequencesQD.TableName);

            // Identificação dos Campos a serem Alterados
            lUpdate.Fields.Add(QueryDictionaries.SequencesQD._SEQ_VALUE.Name, lID, (ItemType) QueryDictionaries.SequencesQD._SEQ_VALUE.DBType);

            string lUpdateQuery;

            lUpdateQuery = String.Format("WHERE {0} = >>{0}", QueryDictionaries.SequencesQD._SEQ_NAME.Name);
            lUpdate.Condition = lUpdateQuery;

            // Passagem dos Valores para a Condição Where do Update
            lUpdate.Conditions.Add(QueryDictionaries.SequencesQD._SEQ_NAME.Name, pIDFieldValue);

            // Execução do UPDATE
            lUpdate.Execute(pTransaction);

            // Retorna novo valor da chave [SEQUENCE VALUE]
            return lID;
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_LOTACAO,代码行数:47,代码来源:DataBaseSequence.cs


示例7: 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


示例8: ValidateInsert

 private static void ValidateInsert(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateConversion(pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:4,代码来源:PLANOINTERNODo.cs


示例9: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(BairroQD._BRR_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(BairroQD._BRR_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(BairroQD._BRR_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(BairroQD._BRR_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:7,代码来源:BairroDo.cs


示例10: Update

        public static OperationResult Update(
            DataFieldCollection pValues,
            List<DataFieldCollection> pListAtuaInc,
            List<DataFieldCollection> pListAtuaUpd,
            DataFieldCollection pValuesAtuaExcluir,
            List<DataFieldCollection> pListPermissao,
            ConnectionInfo pInfo
        )
        {
            Transaction pTransaction;

            pTransaction = new Transaction(Instance.CreateDatabase(pInfo));

            bool lLocalTransaction = (pTransaction != null);

            UpdateCommand lUpdate;

            OperationResult lReturn = new OperationResult(PessoaFuncaoQD.TableName, PessoaFuncaoQD.TableName);

            ValidateUpdate(pValues, lReturn);

            if (lReturn.IsValid)
            {
                try
                {
                    lUpdate = new UpdateCommand(PessoaFuncaoQD.TableName);

                    foreach (DataField lField in pValues.Keys)
                    {
                        if ((lField.Name != PessoaFuncaoQD._PESF_ID.Name))
                            lUpdate.Fields.Add(lField.Name, pValues[lField], (ItemType)lField.DBType);
                    }

                    string lSql = "";
                    lSql = String.Format("WHERE {0} = <<{0}", PessoaFuncaoQD._PESF_ID.Name);
                    lUpdate.Condition = lSql;
                    lUpdate.Conditions.Add(PessoaFuncaoQD._PESF_ID.Name, pValues[PessoaFuncaoQD._PESF_ID].DBToDecimal());

                    lUpdate.Execute(pTransaction);

                    if (!lReturn.HasError)
                    {
                        //Excluir atuação do núcleo alterado
                        if (pValuesAtuaExcluir.Count > 0)
                        {
                            lReturn = AtuacaoDo.UpdateInativo(pValuesAtuaExcluir, pInfo);

                            if (lReturn.HasError)
                            {
                                pTransaction.Rollback();
                                return lReturn;
                            }
                        }

                        if (pListAtuaInc.Count > 0)
                        {
                            foreach (DataFieldCollection lFields in pListAtuaInc)
                            {
                                lReturn = AtuacaoDo.Insert(lFields, pTransaction, pInfo);

                                if (lReturn.HasError)
                                {
                                    pTransaction.Rollback();
                                    return lReturn;
                                }
                            }
                        }

                        if (pListAtuaUpd.Count > 0)
                        {
                            foreach (DataFieldCollection lFields in pListAtuaUpd)
                            {
                                lReturn = AtuacaoDo.Update(lFields, pTransaction, pInfo);

                                if (lReturn.HasError)
                                {
                                    pTransaction.Rollback();
                                    return lReturn;
                                }
                            }
                        }

                        if (pListPermissao.Count > 0)
                        {
                            foreach (DataFieldCollection lFields in pListPermissao)
                            {
                                lReturn = SecurityUsersDtDo.Insert(lFields, pTransaction, pInfo);

                                if (lReturn.HasError)
                                {
                                    pTransaction.Rollback();
                                    return lReturn;
                                }
                            }
                        }

                        if (!lReturn.HasError)
                        {
                            pTransaction.Commit();
                        }
//.........这里部分代码省略.........
开发者ID:andreibaptista,项目名称:DEF_PUB_PORTAL,代码行数:101,代码来源:PessoaFuncaoDo.cs


示例11: TramitacaoUpdate

        private void TramitacaoUpdate(string pOpcao)
        {
            DataFieldCollection lFields = new DataFieldCollection();
            OperationResult lReturn = new OperationResult();

            try
            {
                lFields.Add(TRAMITACAOQD._TRA_ID, hidTRA_ID.Value);
                lFields.Add(TRAMITACAOQD._SPED_ID, pOpcao);
                lFields.Add(TRAMITACAOQD._TRA_REGDATE, DateTime.Now);
                lFields.Add(TRAMITACAOQD._TRA_REGUSER, "USER");
                lFields.Add(TRAMITACAOQD._TRA_STATUS, "A");

                //4 - indeferido
                if (pOpcao.Equals("4"))
                {

                }
                else if (pOpcao.Equals("3")) // 3 - DEFERIDO
                {
                    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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:42,代码来源:AcompanharPrestacaoConta.aspx.cs


示例12: InterfaceInclude

        private void InterfaceInclude()
        {
            try
            {
                LoginUserDo oUsuario = (LoginUserDo)Session["UsuarioAtual"];
                string pPath = "";

                if (chkTipoCaminho.Checked)
                    pPath = @"~\anexos\File\" + hdPathImgDestaque1.Value.Trim();
                else
                    pPath = txtBannerPath.Text;

                if(validaDados())
                {
                    DataFieldCollection lFields = new DataFieldCollection();
                    OperationResult lReturn = new OperationResult();

                    lFields.Add(PORT_BANNERQD._BAN_PATH, @"~\banners\" + hdPathImgDestaque.Value.Trim());
                    lFields.Add(PORT_BANNERQD._BAN_LINK, pPath);
                    lFields.Add(PORT_BANNERQD._BAN_ORDEM, txtBanOrdemDestaque.Text);
                    lFields.Add(PORT_BANNERQD._BAN_REGDATE, DateTime.Now);
                    lFields.Add(PORT_BANNERQD._BAN_REGUSER, oUsuario.LoginName.ToString());
                    lFields.Add(PORT_BANNERQD._BAN_REGSTATUS, "A");

                    lReturn = PORT_BANNERDo.Insert(lFields, LocalInstance.ConnectionInfo);

                    if (!lReturn.IsValid)
                    {
                        Exception err = new Exception(lReturn.OperationException.Message.ToString());
                        exibirMensagem(UpdatePanelPrincipal, "Cadastro de Banner", err.Message, "erro");
                    }
                    else
                    {
                        if (msg != "")
                        {
                            exibirMensagem(UpdatePanelPrincipal, "Cadastro de Banner", msg, "alerta");
                        }
                        else
                        {
                            exibirMensagem(UpdatePanelPrincipal, "Cadastro de Banner", "Banner cadastrado com sucesso");
                            Clear();
                        }
                    }
                }
            }
            catch (Exception err)
            {
                exibirMensagem(UpdatePanelPrincipal, "Cadastro de Banner", err.Message, "erro");
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_PORTAL,代码行数:50,代码来源:cadBanner.aspx.cs


示例13: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(NucleoxLocalidadeQD._NUCLOC_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(NucleoxLocalidadeQD._NUCLOC_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(NucleoxLocalidadeQD._NUCLOC_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(NucleoxLocalidadeQD._NUCLOC_STATUS, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_PORTAL,代码行数:7,代码来源:NucleoxLocalidadeDo.cs


示例14: InterfaceUpdateAnexoSuprimento

        private void InterfaceUpdateAnexoSuprimento(decimal pSUPFUNANX_ID)
        {
            try
            {
                DataFieldCollection lFields = new DataFieldCollection();
                OperationResult lReturn = new OperationResult();

                lFields.Add(SuprimentoFundo_AnexoQD._SUPFUNANX_ID, pSUPFUNANX_ID);
                lFields.Add(SuprimentoFundo_AnexoQD._SUPFUNANX_REGDATE, DateTime.Now);
                lFields.Add(SuprimentoFundo_AnexoQD._SUPFUNANX_REGUSER, Session["_SessionUser"].ToString());
                lFields.Add(SuprimentoFundo_AnexoQD._SUPFUNANX_STATUS, "I");

                lReturn = SuprimentoFundo_AnexoTo.Update(lFields, LocalInstance.ConnectionInfo);

                if (!lReturn.IsValid)
                {
                    Exception err = new Exception(lReturn.OperationException.Message.ToString());
                    throw err;
                }
                else
                {
                    LoadGridAnexoSuprimento(hidKEY_ID.Value.DBToDecimal());
                    lblMSG.Text = "Registro Excluído";
                    lblMSG.Visible = true;
                }
            }
            catch (WebManagerException wex)
            {
                wex.TratarExcecao(true);
            }
            catch (Exception e)
            {
                (new UnknownException(e)).TratarExcecao(true);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:35,代码来源:AcompanharPedidoFinanceiro.aspx.cs


示例15: IncludeImagem

        private void IncludeImagem()
        {
            DataFieldCollection lFields = new DataFieldCollection();
            OperationResult lReturn = new OperationResult();

            byte[] Anexo = new byte[0];
            string lTipo = "";
            if (hidTipo.Value.Equals("2")) //Diaria
            {
                #region Empenho
                //1 empenho
                if (btnImgEmpenho.FileName != "")
                {
                    //    lTipo = Path.GetExtension(Path.GetFileName(btnImgEmpenho.FileName));
                    //    Anexo = new byte[0];

                    //    if (lTipo.ToLower() == ".jpg")
                    //    {
                    Anexo = carregaAnexoEmpenho();

                    lFields.Clear();
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPRO_ID, hidPESF_ID.Value);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_TIPO, 1);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_IMG, Anexo);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGDATE, DateTime.Now);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGUSER, Session["_SessionUser"].ToString());
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_STATUS, "A");

                    lReturn = Diaria_Proposto_AnexoTo.Insert(lFields, LocalInstance.ConnectionInfo);

                    if (!lReturn.IsValid)
                    {
                        Exception err = new Exception(lReturn.OperationException.Message.ToString());
                        throw err;
                    }
                    //    }
                    //    else
                    //    {
                    //        lblMSG.Visible = true;
                    //        lblMSG.Text = "Só possível salvar imagens JPG ou JPEG";
                    //    }
                }
                #endregion

                #region LIQUIDAÇÃO

                //2 LIQUIDAÇÃO
                if (btnImgLiquidacao.FileName != "")
                {
                    //lTipo = Path.GetExtension(Path.GetFileName(btnImgLiquidacao.FileName));
                    //Anexo = new byte[0];

                    //if (lTipo.ToLower() == ".jpg")
                    //{
                    Anexo = carregaAnexoLiquidacao();

                    lFields.Clear();
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPRO_ID, hidPESF_ID.Value);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_TIPO, 2);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_IMG, Anexo);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGDATE, DateTime.Now);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGUSER, Session["_SessionUser"].ToString());
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_STATUS, "A");

                    lReturn = Diaria_Proposto_AnexoTo.Insert(lFields, LocalInstance.ConnectionInfo);

                    if (!lReturn.IsValid)
                    {
                        Exception err = new Exception(lReturn.OperationException.Message.ToString());
                        throw err;
                    }
                    //}
                    //else
                    //{
                    //    lblMSG.Visible = true;
                    //    lblMSG.Text = "Só possível salvar imagens JPG ou JPEG";
                    //}
                }
                #endregion

                #region OB
                //2 OB
                if (btnImgOb.FileName != "")
                {
                    //lTipo = Path.GetExtension(Path.GetFileName(btnImgOb.FileName));
                    //Anexo = new byte[0];

                    //if (lTipo.ToLower() == ".jpg")
                    //{
                    Anexo = carregaAnexoOb();

                    lFields.Clear();
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPRO_ID, hidPESF_ID.Value);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_TIPO, 3);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_IMG, Anexo);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGDATE, DateTime.Now);
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_REGUSER, Session["_SessionUser"].ToString());
                    lFields.Add(Diaria_Proposto_AnexoQD._DIAPROANX_STATUS, "A");

                    lReturn = Diaria_Proposto_AnexoTo.Insert(lFields, LocalInstance.ConnectionInfo);
//.........这里部分代码省略.........
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:101,代码来源:AcompanharPedidoFinanceiro.aspx.cs


示例16: InterfaceUpdate

        private void InterfaceUpdate(decimal pNOTFIS_ID, string pStatus)
        {
            try
            {
                DataFieldCollection lFields = new DataFieldCollection();
                OperationResult lReturn = new OperationResult();

                lFields.Add(NotaFiscalQD._NOTFIS_ID, pNOTFIS_ID);

                if (pStatus == "A")
                {
                    lFields.Add(NotaFiscalQD._NOTFIS_NUMERO, txtNOTFIS_NUMERO.Text);
                    lFields.Add(NotaFiscalQD._NOTFIS_VALOR, txtNOTFIS_VALOR.Text);
                    //lFields.Add(NotaFiscalQD._FIG_ID.Text);
                    //lFields.Add(NotaFiscalQD._PRESNOT_ID , txtPRESNOT_ID.Text);
                }

                lFields.Add(NotaFiscalQD._NOTFIS_REGDATE, DateTime.Now);
                lFields.Add(NotaFiscalQD._NOTFIS_REGUSER, "USER");
                lFields.Add(NotaFiscalQD._NOTFIS_STATUS, pStatus);

                lReturn = NotaFiscalTo.Update(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);
                    //Clear();
                }
            }
            catch (WebManagerException e)
            {
                e.TratarExcecao(true);
            }
            catch (Exception err)
            {
                (new UnknownException(err)).TratarExcecao(true);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:43,代码来源:NotaFiscal.aspx.cs


示例17: 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);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:36,代码来源:NotaFiscal.aspx.cs


示例18: PropostoUpdate

        private bool PropostoUpdate()
        {
            if (hidTipo.Value.Equals("2")) //Diaria
            {
                try
                {
                    DataFieldCollection lFields = new DataFieldCollection();
                    OperationResult lReturn = new OperationResult();

                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_ID, hidPESF_ID.Value);

                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_NUMEROEMPENHO, txtEmpenho.Text);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_LIQUIDACAO, txtLiquidacao.Text);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_OB, txtOB.Text);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_PD, txtDOCSAL_SALDO.Text);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_EVENTO, txtEvento.Text);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_REGDATE, DateTime.Now);
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_REGUSER, Session["_SessionUser"].ToString());
                    lFields.Add(DIARIA_PROPOSTOQD._DIAPRO_STATUS, "A");

                    lReturn = DIARIA_PROPOSTOTo.Update(lFields, LocalInstance.ConnectionInfo);

                    if (!lReturn.IsValid)
                    {
                        Exception err = new Exception(lReturn.OperationException.Message.ToString());
                        throw err;
                    }
                    else
                    {
                        //InterfaceIncludeDocumentoSaldo();
                        IncludeImagem();
                        return true;
                    }
                }
                catch (WebManagerException e)
                {
                    e.TratarExcecao(true);
                }
                catch (Exception err)
                {
                    (new UnknownException(err)).TratarExcecao(true);
                }
            }
            else //suprimento de fundo
            {
                try
                {
                    DataFieldCollection lFields = new DataFieldCollection();
                    OperationResult lReturn = new OperationResult();

                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_ID, hidKEY_ID.Value);

                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_NUMEROEMPENHO, txtEmpenho.Text);
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_LIQUIDACAO, txtLiquidacao.Text);
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_OB, txtOB.Text);
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_PD, txtDOCSAL_SALDO.Text);
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_REGDATE, DateTime.Now);
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_REGUSER, Session["_SessionUser"].ToString());
                    lFields.Add(SUPRIMENTOFUNDOQD._SUPFUN_STATUS, "A");

                    lReturn = SUPRIMENTOFUNDOTo.Update(lFields, LocalInstance.ConnectionInfo);

                    if (!lReturn.IsValid)
                    {
                        Exception err = new Exception(lReturn.OperationException.Message.ToString());
                        throw err;
                    }
                    else
                    {
                        //InterfaceIncludeDocumentoSaldo();
                        IncludeImagem();
                        return true;
                    }
                }
                catch (WebManagerException e)
                {
                    e.TratarExcecao(true);
                }
                catch (Exception err)
                {
                    (new UnknownException(err)).TratarExcecao(true);
                }
            }
            return false;
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_DEFNET_PORTAL,代码行数:85,代码来源:AcompanharPedidoFinanceiro.aspx.cs


示例19: InterfaceInclude

        private void InterfaceInclude()
        {
            try
            {
                DataFieldCollection lFields = new DataFieldCollection();
                OperationResult lReturn = new OperationResult();

                String Aux;

                Aux = txtDESCCENTES_APRESENTACAO.Text.Replace("size", "");
                Aux = txtDESCCENTES_APRESENTACAO.Text.Replace("H1", "");
                Aux = txtDESCCENTES_APRESENTACAO.Text.Replace("H2", "");
                Aux = txtDESCCENTES_APRESENTACAO.Text.Replace("H3", "");
                Aux = txtDESCCENTES_APRESENTACAO.Text.Replace("H4", "");
                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_APRESENTACAO, Aux);
                Aux = txtDESCCENTES_OBJETIVO.Text.Replace("size", "");
                Aux = txtDESCCENTES_OBJETIVO.Text.Replace("H1", "");
                Aux = txtDESCCENTES_OBJETIVO.Text.Replace("H2", "");
                Aux = txtDESCCENTES_OBJETIVO.Text.Replace("H3", "");
                Aux = txtDESCCENTES_OBJETIVO.Text.Replace("H4", "");
                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_OBJETIVO, Aux);
                Aux = txtDESCCENTES_CONTATO.Text.Replace("size", "");
                Aux = txtDESCCENTES_CONTATO.Text.Replace("H1", "");
                Aux = txtDESCCENTES_CONTATO.Text.Replace("H2", "");
                Aux = txtDESCCENTES_CONTATO.Text.Replace("H3", "");
                Aux = txtDESCCENTES_CONTATO.Text.Replace("H4", "");
                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_CONTATO, Aux);

                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_REGDATE, DateTime.Now);
                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_REGUSER, "USER");
                lFields.Add(DESCCENTROESTUDOQD._DESCCENTES_STATUS, "A");

                lReturn = DESCCENTROESTUDOTo.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();
                    LoadCampos 

鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# DefNpj.ConnectionInfo类代码示例发布时间:2022-05-24
下一篇:
C# DefNet.ConnectionInfo类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap