本文整理汇总了C#中API.DAL.ConnectionManager.CommitTransaction方法的典型用法代码示例。如果您正苦于以下问题:C# ConnectionManager.CommitTransaction方法的具体用法?C# ConnectionManager.CommitTransaction怎么用?C# ConnectionManager.CommitTransaction使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类API.DAL.ConnectionManager
的用法示例。
在下文中一共展示了ConnectionManager.CommitTransaction方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: 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();
}
}
}
示例2: 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();
}
}
}
示例3: 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();
}
}
}
示例4: 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();
}
}
}
示例5: 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();
}
}
}
示例6: DeleteSecurityRule
public void DeleteSecurityRule(ref CustomList<RuleDetails> objSecurityRuleDetailList, ref CustomList<SecurityRule> securityRuleList)
{
ConnectionManager conManager = new ConnectionManager(ConnectionName.SysMan);
Boolean blnTranStarted = false;
try
{
ReSetSPNameForDelete(securityRuleList, objSecurityRuleDetailList);
conManager.BeginTransaction();
blnTranStarted = true;
conManager.SaveDataCollectionThroughCollection(blnTranStarted, objSecurityRuleDetailList, securityRuleList);
objSecurityRuleDetailList.AcceptChanges();
securityRuleList.AcceptChanges();
conManager.CommitTransaction();
blnTranStarted = false;
conManager.Dispose();
}
catch (Exception ex)
{
conManager.RollBack();
throw (ex);
}
finally
{
if (conManager.IsNotNull())
{
conManager.Dispose();
}
}
}
示例7: 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();
}
}
}
示例8: 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();
}
}
}
示例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();
}
}
}
示例10: 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();
}
}
}
示例11: 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();
}
}
}
示例12: 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();
}
}
}
示例13: 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();
}
}
}
示例14: 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);
}
}
示例15: 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();
}
}
}