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

C# DefNpj.OperationResult类代码示例

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

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



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

示例1: ValidateDecimal

        private static void ValidateDecimal(string pFieldName, object pValue, OperationResult pOperationResult)
        {
            decimal lResult;

            if (!Decimal.TryParse(pValue.ToString(), out lResult))
            {
                pOperationResult.InvalidField(pFieldName, "Invalid", pValue);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:9,代码来源:GenericDataObject.cs


示例2: ValidateDate

        private static void ValidateDate(string pFieldName, object pValue, OperationResult pOperationResult)
        {
            DateTime lResult;

            if (pValue.GetType() == typeof(DateTime)) return;

            if (!DateTime.TryParse(pValue.ToString(), out lResult))
            {
                pOperationResult.InvalidField(pFieldName, "Invalid", pValue);
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:11,代码来源:GenericDataObject.cs


示例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(NPJ_ALUNOXATENDIMENTOQD.TableName, NPJ_ALUNOXATENDIMENTOQD.TableName);

            if (!lReturn.HasError){
                try{
                    if (lLocalTransaction){
                        lReturn.Trace("Transação local, instanciando banco...");
                    }

                    lInsert = new InsertCommand(NPJ_ALUNOXATENDIMENTOQD.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;

                    lReturn.Trace("Executando o Insert");
                    lInsert.Execute(lTransaction);

                    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_CALC,代码行数:51,代码来源:NPJ_ALUNOXATENDIMENTODo.cs


示例4: 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_CALC,代码行数:47,代码来源:DataBaseSequence.cs


示例5: ValidateRequired

 public static void ValidateRequired(DataField pField, DataFieldCollection pValues, OperationResult pOperationResult)
 {
     if (!pValues.ContainsKey(pField))
     {
         pOperationResult.InvalidField(pField.Name, "Required", null);
     }
     else
     {
         if (pValues[pField] == null)
         {
             pOperationResult.InvalidField(pField.Name, "Required", null);
         }
         else
         {
             if (pValues[pField].ToString() == "")
                 pOperationResult.InvalidField(pField.Name, "Required", null);
         }
     }
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:19,代码来源:GenericDataObject.cs


示例6: ValidateConversion

        public static void ValidateConversion(DataFieldCollection pValues, OperationResult pOperationResult)
        {
            foreach (DataField lField in pValues.Keys)
            {
                switch (lField.DBType)
                {
                    case 0:

                        ValidateDecimal(lField.Name, pValues[lField], pOperationResult);

                        break;

                    case 2:

                        ValidateDate(lField.Name, pValues[lField], pOperationResult);

                        break;
                }
            }
        }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:20,代码来源:GenericDataObject.cs


示例7: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(SituacaoEscolarQD._STESC_ID, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:4,代码来源:SituacaoEscolarDo.cs


示例8: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(NPJ_ALUNOXATENDIMENTOQD._DOC_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(NPJ_ALUNOXATENDIMENTOQD._SUSR_ID, pValues, pResult);
     //GenericDataObject.ValidateRequired(NPJ_ALUNOXATENDIMENTOQD._SIT_ID, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:6,代码来源:NPJ_ALUNOXATENDIMENTODo.cs


示例9: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(MedidasCriminalQD._MDCRM_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(MedidasCriminalQD._MDCRM_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(MedidasCriminalQD._MDCRM_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(MedidasCriminalQD._MDCRM_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:MedidasCriminalDo.cs


示例10: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(SEG_USUARIOXGRUPOQD._GRP_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(SEG_USUARIOXGRUPOQD._SUSR_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(SEG_USUARIOXGRUPOQD._SUSR_REGSTATUS, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:6,代码来源:SEG_USUARIOXGRUPODo.cs


示例11: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(SEG_GRUPOXPROGRAMAQD._GRP_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(SEG_GRUPOXPROGRAMAQD._PRO_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(SEG_GRUPOXPROGRAMAQD._GRP_REGSTATUS, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:6,代码来源:SEG_GRUPOXPROGRAMADo.cs


示例12: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(DCALC_CONDENACAOQD._COND_ID, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:4,代码来源:DCALC_CONDENACAODo.cs


示例13: Insert

        public static OperationResult Insert(
           DataFieldCollection pValues,
           Transaction pTransaction,
           ConnectionInfo pInfo
        )
        {
            Transaction lTransaction;

            bool lLocalTransaction = (pTransaction == null);

            if (lLocalTransaction)
                lTransaction = new Transaction(Instance.CreateDatabase(pInfo));
            else
                lTransaction = pTransaction;

            InsertCommand lInsert;

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

            if (!lReturn.HasError)
            {
                try
                {
                    lInsert = new InsertCommand(SituacaoFamiliarResideQD.TableName);

                    foreach (DataField lField in pValues.Keys)
                    {
                        lInsert.Fields.Add(lField.Name, pValues[lField], (ItemType)lField.DBType);
                    }
                    decimal lSequence;
                    lSequence = DataBaseSequenceControl.GetNext(pInfo, "STFRES_ID");
                    lInsert.Fields.Add(SituacaoFamiliarResideQD._STFRES_ID.Name, lSequence, (ItemType)SituacaoFamiliarResideQD._STFRES_ID.DBType);

                    lInsert.Execute(lTransaction);

                    if (!lReturn.HasError)
                    {
                        if (lLocalTransaction)
                        {
                            if (!lReturn.HasError)
                            {

                                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_CALC,代码行数:67,代码来源:SituacaoFamiliarResideDo.cs


示例14: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(SituacaoFamiliarResideQD._STFAM_ID, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:4,代码来源:SituacaoFamiliarResideDo.cs


示例15: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(DocumentoxEETipoAcaoQD._DOCEETPAC_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(DocumentoxEETipoAcaoQD._DOCEETPAC_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(DocumentoxEETipoAcaoQD._DOCEETPAC_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(DocumentoxEETipoAcaoQD._DOCEETPAC_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:DocumentoxEETipoAcaoDo.cs


示例16: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(AssuntoPsicossocialQD._ASSPS_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(AssuntoPsicossocialQD._ASSPS_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(AssuntoPsicossocialQD._ASSPS_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(AssuntoPsicossocialQD._ASSPS_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:AssuntoPsicossocialDo.cs


示例17: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(ObservacoesDocumentoQD._OBSDOC_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(ObservacoesDocumentoQD._OBSDOC_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(ObservacoesDocumentoQD._OBSDOC_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(ObservacoesDocumentoQD._OBSDOC_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:ObservacoesDocumentoDo.cs


示例18: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(AtividadeDefensorQD._ATDEF_ID, pValues, pResult);
     GenericDataObject.ValidateRequired(AtividadeDefensorQD._ATDEF_REGDATE, pValues, pResult);
     GenericDataObject.ValidateRequired(AtividadeDefensorQD._ATDEF_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(AtividadeDefensorQD._ATDEF_STATUS , pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:AtividadeDefensorDo.cs


示例19: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(ParametrosModeloPeticaoQD._PRMPT_ID, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:4,代码来源:ParametrosModeloPeticaoDo.cs


示例20: ValidateUpdate

 private static void ValidateUpdate(DataFieldCollection pValues, OperationResult pResult)
 {
     GenericDataObject.ValidateRequired(InteressadoQD._INTE_ID, pValues, pResult);
     //GenericDataObject.ValidateRequired(InteressadoQD._INTE_REGDATE, pValues, pResult);
     //GenericDataObject.ValidateRequired(InteressadoQD._INTE_REGUSER, pValues, pResult);
     GenericDataObject.ValidateRequired(InteressadoQD._INTE_STATUS, pValues, pResult);
 }
开发者ID:andreibaptista,项目名称:DEF_PUB_CALC,代码行数:7,代码来源:InteressadoDo.cs



注:本文中的APB.Mercury.DataObjects.DefNpj.OperationResult类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# SCPWeb.ConnectionInfo类代码示例发布时间:2022-05-24
下一篇:
C# DefNpj.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