当前位置: 首页>>代码示例>>C#>>正文


C# ConnectionManager.BeginTransaction方法代码示例

本文整理汇总了C#中API.DAL.ConnectionManager.BeginTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# ConnectionManager.BeginTransaction方法的具体用法?C# ConnectionManager.BeginTransaction怎么用?C# ConnectionManager.BeginTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在API.DAL.ConnectionManager的用法示例。


在下文中一共展示了ConnectionManager.BeginTransaction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SaveEntity

        public void SaveEntity(ref CustomList<EntityList> EntityList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();

               ReSetSPName(EntityList);

               blnTranStarted = true;

               conManager.SaveDataCollectionThroughCollection(blnTranStarted, EntityList);

               conManager.CommitTransaction();
               blnTranStarted = false;
               conManager.Dispose();
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:EntityManager.cs

示例2: deleteWrokFlow

        public void deleteWrokFlow(ref CustomList<CmnWorkFlowMaster> lstCmnWorkFlowMaster, ref CustomList<CmnWorkFlowDetail> lstCmnWorkFlowDetail)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;
            try
            {
                conManager.BeginTransaction();
                lstCmnWorkFlowDetail.DeleteSpName = "spDeleteCmnWorkFlowDetail";
                lstCmnWorkFlowMaster.DeleteSpName = "spDeleteCmnWorkFlowMaster";
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstCmnWorkFlowDetail, lstCmnWorkFlowMaster);

                conManager.CommitTransaction();
                blnTranStarted = false;
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:28,代码来源:WorkFlowManager.cs

示例3: SaveFiscalYear

        public void SaveFiscalYear(ref CustomList<Gen_FY> Gen_FYList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(Gen_FYList);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, Gen_FYList);
                //object scope_Identity = conManager.InsertData(blnTranStarted, BankKist);

                Gen_FYList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:FiscalYearManager.cs

示例4: SaveUnitSetup

        public void SaveUnitSetup(ref CustomList<ItemSubGroup> lstItemSubGroup)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(lstItemSubGroup);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstItemSubGroup);

                lstItemSubGroup.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:34,代码来源:ItemSubGroupManager.cs

示例5: DeleteTempData

        public void DeleteTempData(ref CustomList<GroupRule> lstGroupSecurityRule)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            Boolean blnTranStarted = false;

            try
            {
                ReSetTempTransactionDeleteSPName(ref lstGroupSecurityRule);
                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstGroupSecurityRule);

                lstGroupSecurityRule.AcceptChanges();
                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:30,代码来源:GroupInformationManager.cs

示例6: SaveReportPermission

        public void SaveReportPermission(ref CustomList<ReportPermission> rPList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();

               ReSetSPName(rPList);

               blnTranStarted = true;

               conManager.SaveDataCollectionThroughCollection(blnTranStarted, rPList);

               rPList.AcceptChanges();

               conManager.CommitTransaction();
               blnTranStarted = false;
               conManager.Dispose();
               }
               catch (Exception Ex)
               {
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:33,代码来源:ReportPermissionManager.cs

示例7: DeleteGroup

        public void DeleteGroup(ref CustomList<UserGroup> userGroupList, ref CustomList<GroupRule> groupSecurityRuleList, ref CustomList<Group> groupList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            Boolean blnTranStarted = false;

            try
            {
                ReSetDeleteSPName(groupList, groupSecurityRuleList, userGroupList);

                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, userGroupList, groupSecurityRuleList, groupList);
                userGroupList.AcceptChanges();
                groupSecurityRuleList.AcceptChanges();
                groupList.AcceptChanges();
                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:GroupInformationManager.cs

示例8: GetAllTransactionDataSources

        public DataSet GetAllTransactionDataSources(String StockTransID)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;
               String spName = String.Empty;
               try
               {

               DataSet dsLoad = new DataSet();
               DataSet dsReturn = new DataSet();

               conManager.BeginTransaction();
               blnTranStarted = true;

               spName = String.Format("Exec sprptStorckTransactionAll  @StockTransID = '{0}'", StockTransID);
               conManager.OpenDataSetThroughAdapter(spName, ref dsLoad, true);
               dsLoad.Tables[0].TableName = "sprptStorckTransactionAll";
               dsReturn.Tables.Add(dsLoad.Tables[0].Copy());

               conManager.CommitTransaction();
               blnTranStarted = false;
               return dsReturn;
               }
               catch (Exception ex)
               {
               if (blnTranStarted)
               {
                   conManager.RollBack();
               }
               throw (ex);
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:ReportManager.cs

示例9: SaveMailSetup

        public void SaveMailSetup(CustomList<MailSetup> MailSetupList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();
               blnTranStarted = true;
               ReSetSPName(ref MailSetupList);

               conManager.SaveDataCollectionThroughCollection(blnTranStarted, MailSetupList);

               MailSetupList.AcceptChanges();

               conManager.CommitTransaction();
               blnTranStarted = false;
               conManager.Dispose();
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:32,代码来源:MailSetupManager.cs

示例10: SaveBankReconciliation

        public void SaveBankReconciliation(ref CustomList<Acc_Voucher> VoucherList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();
                VoucherList.UpdateSpName = "spUpdateAcc_VoucherBankReconciliation";
                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, VoucherList);

                VoucherList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:31,代码来源:BankReconciliationManager.cs

示例11: DeleteHKEntry

        public void DeleteHKEntry(ref CustomList<HouseKeepingValue> HKList, ref CustomList<HousekeepingHierarchy> lstChild)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;
            try
            {
                conManager.BeginTransaction();

                ReSetSPName(HKList, lstChild);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstChild, HKList);

                lstChild.AcceptChanges();
                HKList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:34,代码来源:HKEntryManager.cs

示例12: SaveBankAccount

        public void SaveBankAccount(ref CustomList<CmnBankAccount> BankAccountList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
               Boolean blnTranStarted = false;

               try
               {
               conManager.BeginTransaction();

               ReSetSPName(BankAccountList);
               Int32 accountID = BankAccountList[0].AccountID;
               blnTranStarted = true;
               if (BankAccountList[0].IsAdded)
                   accountID = Convert.ToInt32(conManager.InsertData(blnTranStarted, BankAccountList));
               else
                   conManager.SaveDataCollectionThroughCollection(blnTranStarted, BankAccountList);

               BankAccountList.AcceptChanges();

               conManager.CommitTransaction();
               blnTranStarted = false;
               }
               catch (Exception Ex)
               {
               conManager.RollBack();
               throw Ex;
               }
               finally
               {
               if (conManager.IsNotNull())
               {
                   conManager.Dispose();
               }
               }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:BankAccountManager.cs

示例13: SaveCmnDocListTableMapping

        public void SaveCmnDocListTableMapping(ref CustomList<CmnDocListTableMapping> CmnDocListTableMappingList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(CmnDocListTableMappingList);
                Int64 TransactionTypeKey = CmnDocListTableMappingList[0].DocListTableMappingID;
                blnTranStarted = true;
                if (CmnDocListTableMappingList[0].IsAdded)
                    TransactionTypeKey = Convert.ToInt64(conManager.InsertData(blnTranStarted, CmnDocListTableMappingList));
                else
                    conManager.SaveDataCollectionThroughCollection(blnTranStarted, CmnDocListTableMappingList);

                CmnDocListTableMappingList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:35,代码来源:MenuWiseTableMappingManager.cs

示例14: SaveUserProfile

        public void SaveUserProfile(ref CustomList<UserProfile> UserProfileList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
            Boolean blnTranStarted = false;

            try
            {
                conManager.BeginTransaction();

                ReSetSPName(UserProfileList);

                blnTranStarted = true;

                conManager.SaveDataCollectionThroughCollection(blnTranStarted, UserProfileList);

                UserProfileList.AcceptChanges();

                conManager.CommitTransaction();
                blnTranStarted = false;
                conManager.Dispose();
            }
            catch (Exception Ex)
            {
                conManager.RollBack();
                throw Ex;
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:34,代码来源:ProfileManager.cs

示例15: DeleteVoucher

        public void DeleteVoucher(ref CustomList<Acc_VoucherDet> VoucherDetList, ref CustomList<Acc_Voucher> VoucherList)
        {
            ConnectionManager conManager = new ConnectionManager(ConnectionName.HR);
            Boolean blnTranStarted = false;

            try
            {
                ReSetSPName(ref VoucherList, ref VoucherDetList);

                conManager.BeginTransaction();
                blnTranStarted = true;
                conManager.SaveDataCollectionThroughCollection(blnTranStarted, VoucherDetList, VoucherList);
                conManager.CommitTransaction();
                VoucherDetList.AcceptChanges();
                VoucherList.AcceptChanges();
            }
            catch (Exception ex)
            {
                conManager.RollBack();
                throw (ex);
            }
            finally
            {
                if (conManager.IsNotNull())
                {
                    blnTranStarted = false;
                    conManager.Dispose();
                }
            }
        }
开发者ID:samnuriu13,项目名称:APIXERP,代码行数:30,代码来源:VoucherManager.cs


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