/// <summary> /// To Delete details of StudentFeesTemplateT for selected StudentFeesTemplateTID from tbl_StudentFeesTemplate_T table /// Created By : NafisaMulla, 02-09-2014 /// Modified By : /// </summary> /// <param name="intStudentFeesTemplateTID"></param> /// <returns></returns> public ApplicationResult StudentFeesTemplateT_Delete_ForInsert(int intStudentFeesTemplateTID, string strAcademicYear) { try { pSqlParameter = new SqlParameter[2]; pSqlParameter[0] = new SqlParameter("@StudentMID", SqlDbType.Int); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = intStudentFeesTemplateTID; pSqlParameter[1] = new SqlParameter("@AcademicYear", SqlDbType.VarChar); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = strAcademicYear; strStoredProcName = "usp_tbl_StudentFeesTemplate_T_Delete_ForInsert"; int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, strStoredProcName, pSqlParameter); if (iResult > 0) { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return objResults; } else { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.FAILURE; return objResults; } } catch (Exception ex) { throw ex; } }
public List <dynamic> GetParamDetailsBySearch(ParamType paramtype, string ID, String SearchParam, String SearchValue) { int?ReturnStatus = 0; System.Data.DataTable dtd = new System.Data.DataTable(); DatabaseTransaction objDB = new DatabaseTransaction(); objDB.AddConnectionName = "RMSRemote"; List <KeyValuePair <object, object> > lst = new List <KeyValuePair <object, object> >(); lst.Add(new KeyValuePair <object, object>("@Type", Convert.ToInt32(paramtype))); lst.Add(new KeyValuePair <object, object>("@ID", ID)); lst.Add(new KeyValuePair <object, object>("@SearchParam", SearchParam)); lst.Add(new KeyValuePair <object, object>("@SearchVal", SearchValue)); dtd = objDB.SqlGetData("JobSearchMobileAppbySearch", ref lst, ExecType.Dynamic, ReturnDBOperation.DataTable, ref ReturnStatus); var dtlist = new List <dynamic>(); if (dtd != null && dtd.Rows.Count > 0) { dtlist = new CommonMethods().DatatableToList(dtd); } return(dtlist); }
/// <summary> /// Saves all unsaved objects asynchronously, then marks them as saved. /// </summary> /// <param name="connection"> /// </param> /// <returns> /// </returns> public static async Task SaveAllAsync(Connection connection) { IEnumerable <SaveableObject> unsavedFileObjects = SaveableObjects.Items.Where(x => !x.IsSaved && !(x is IDatabaseObject)); IEnumerable <IDatabaseObject> unsavedDbObjects = SaveableObjects.Items.Where(x => !x.IsSaved && x is IDatabaseObject).Cast <IDatabaseObject>(); foreach (SaveableObject unsavedFileObject in unsavedFileObjects) { await unsavedFileObject.SaveAsync(connection); } if (unsavedDbObjects.Count() > 0) { using (DatabaseTransaction <QuartzContext> transaction = new DatabaseTransaction <QuartzContext>(connection)) { foreach (IDatabaseObject unsavedDbObject in unsavedDbObjects) { await transaction.AddOrUpdateAsync(unsavedDbObject); } await transaction.SaveChangesAsync(); } foreach (SaveableObject unsavedDbObject in SaveableObjects.Items.Where(x => !x.IsSaved && x is IDatabaseObject)) { unsavedDbObject.IsSaved = true; } } }
public void RollbackTransaction() { if (DatabaseTransaction != null) { DatabaseTransaction.RollBackTransaction(); } }
protected void btnApprove_Click(object sender, EventArgs e) { DatabaseTransaction.OpenConnectionTransation(); foreach (GridViewRow gvrow in gvtemp.Rows) { PaySlipBl objPaySlipBl = new PaySlipBl(); PaySlipBo objPaySlipBo = new PaySlipBo(); ApplicationResult objResultsUpdatePaySlip = new ApplicationResult(); objPaySlipBo.Month = Convert.ToInt32(ddlMonth.SelectedValue); objPaySlipBo.Year = Convert.ToInt32(ddlYear.SelectedValue); if (((CheckBox)gvrow.FindControl("chkChild")).Checked == true) { int id = Convert.ToInt32(gvrow.Cells[1].Text); objPaySlipBo.UserID = id; objPaySlipBo.PayslipApproved = 1; objPaySlipBo.PaySlipSendforApproval = 1; objPaySlipBo.LastModifiedDate = DateTime.UtcNow.AddHours(5.5).ToString(); objPaySlipBo.LastModifiedUserID = Convert.ToInt32(Session[ApplicationSession.USERID]); objResultsUpdatePaySlip = objPaySlipBl.PaySlip_Update_SelectedPart(objPaySlipBo); } } if (objResults.status == ApplicationResult.CommonStatusType.SUCCESS) { ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('Approved SuccessFully');", true); } else { ScriptManager.RegisterStartupScript(this, GetType(), "alert", "alert('Not Approved SuccessFully');", true); } DatabaseTransaction.CommitTransation(); GeneratePayRoll(); }
public void UpdateCharacterProperties(DbObject dbObject, DatabaseTransaction transaction) { foreach (KeyValuePair <PropertyBool, bool> prop in dbObject.PropertiesBool) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBoolUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (KeyValuePair <PropertyInt, uint> prop in dbObject.PropertiesInt) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesIntUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (KeyValuePair <PropertyInt64, ulong> prop in dbObject.PropertiesInt64) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBigIntUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (KeyValuePair <PropertyDouble, double> prop in dbObject.PropertiesDouble) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesDoubleUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (KeyValuePair <PropertyString, string> prop in dbObject.PropertiesString) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesStringUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } }
public void SaveCharacterProperties(DbObject dbObject, DatabaseTransaction transaction) { // known issue: properties that were removed from the bucket will not updated. this is a problem if we // ever need to straight up "delete" a property. foreach (var prop in dbObject.PropertiesBool) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBoolInsert, dbObject.Id, (ushort)prop.Key, prop.Value); } foreach (var prop in dbObject.PropertiesInt) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesIntInsert, dbObject.Id, (ushort)prop.Key, prop.Value); } foreach (var prop in dbObject.PropertiesInt64) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBigIntInsert, dbObject.Id, (ushort)prop.Key, prop.Value); } foreach (var prop in dbObject.PropertiesDouble) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesDoubleInsert, dbObject.Id, (ushort)prop.Key, prop.Value); } foreach (var prop in dbObject.PropertiesString) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesStringInsert, dbObject.Id, (ushort)prop.Key, prop.Value); } }
public void UpdateCharacterProperties(DbObject dbObject, DatabaseTransaction transaction) { foreach (var prop in dbObject.PropertiesBool) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBoolUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (var prop in dbObject.PropertiesInt) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesIntUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (var prop in dbObject.PropertiesInt64) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesBigIntUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (var prop in dbObject.PropertiesDouble) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesDoubleUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } foreach (var prop in dbObject.PropertiesString) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterPropertiesStringUpdate, prop.Value, (ushort)prop.Key, dbObject.Id); } }
public void UpdateCharacterSkills(Character character, DatabaseTransaction transaction) { foreach (var skill in character.Skills) { transaction.AddPreparedStatement(CharacterPreparedStatement.CharacterSkillsUpdate, (uint)skill.Value.Status, (ushort)skill.Value.Ranks, skill.Value.ExperienceSpent, character.Id, (uint)skill.Value.Skill); } }
public void UpdateContent(Content content) { if (content?.ContentGuid == null) { throw new ArgumentNullException("content", "Cannot update null content or content with a null ContentGuid."); } DatabaseTransaction transaction = BeginTransaction(); transaction.AddPreparedUpdateStatement(WorldPreparedStatement.UpdateContent, content); // forcibly propagate the content id content.Weenies.ForEach(w => w.ContentGuid = content.ContentGuid.Value); content.ExternalResources.ForEach(r => r.ContentGuid = content.ContentGuid.Value); content.AssociatedLandblocks.ForEach(l => l.ContentGuid = content.ContentGuid.Value); content.AssociatedContent.ForEach(c => c.ContentGuid = content.ContentGuid.Value); content.Weenies.Where(o => o.IsDirty).ToList().ForEach(w => transaction.AddPreparedUpdateStatement(WorldPreparedStatement.UpdateContentWeenie, w)); content.ExternalResources.Where(o => o.IsDirty).ToList().ForEach(r => transaction.AddPreparedUpdateStatement(WorldPreparedStatement.UpdateContentResource, r)); content.AssociatedLandblocks.Where(o => o.IsDirty).ToList().ForEach(l => transaction.AddPreparedUpdateStatement(WorldPreparedStatement.UpdateContentLandblock, l)); // content resources are weak entities that cannot be updated. always delete and reinsert the list var criteria = new Dictionary <string, object>(); criteria.Add("contentGuid1", content.ContentGuid.Value.ToByteArray()); transaction.AddPreparedDeleteListStatement <WorldPreparedStatement, ContentLink>(WorldPreparedStatement.DeleteAssociatedContent, criteria); transaction.AddPreparedInsertListStatement(WorldPreparedStatement.DeleteAssociatedContent, content.AssociatedContent); transaction.Commit().Wait(); content.ClearDirtyFlags(); }
/// <summary> /// To Delete details of JournalVoucherT for selected JournalTID from tbl_JournalVoucher_T table /// Created By : Viral, 10/13/2014 /// Modified By : /// </summary> /// <param name="intJournalTID"></param> /// <returns></returns> public ApplicationResult JournalVoucherT_Delete(string strVoucherCode) { try { pSqlParameter = new SqlParameter[1]; pSqlParameter[0] = new SqlParameter("@VoucherCode", SqlDbType.NVarChar); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = strVoucherCode; strStoredProcName = "usp_tbl_JournalVoucher_T_Delete"; int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, strStoredProcName, pSqlParameter); if (iResult > 0) { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return(objResults); } else { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.FAILURE; return(objResults); } } catch (Exception ex) { throw ex; } }
/// <summary> /// To Delete details of StudentFeesTemplateT for selected StudentFeesTemplateTID from tbl_StudentFeesTemplate_T table /// Created By : NafisaMulla, 02-09-2014 /// Modified By : /// </summary> /// <param name="intStudentFeesTemplateTID"></param> /// <returns></returns> public ApplicationResult StudentFeesTemplateT_Delete_By_ClassWiseTemplateTID(int intStudentFeesTemplateTID, int intIsLate) { try { pSqlParameter = new SqlParameter[2]; pSqlParameter[0] = new SqlParameter("@ClassWiseFeesTemplateTID", SqlDbType.Int); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = intStudentFeesTemplateTID; pSqlParameter[1] = new SqlParameter("@IsLate", SqlDbType.Int); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = intIsLate; strStoredProcName = "usp_tbl_StudentFeesTemplate_T_Delete_By_ClassTemplateTID"; int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, strStoredProcName, pSqlParameter); if (iResult > 0) { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return objResults; } else { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.FAILURE; return objResults; } } catch (Exception ex) { throw ex; } }
/// <summary> /// To Delete details of BankAssociation for selected BankAssociationMID from tbl_BankAssociation_M table /// Created By : NafisaMulla, 26/6/2014 /// Modified By : /// </summary> /// <param name="intBankAssociationMID"></param> /// <returns></returns> public ApplicationResult BankAssociation_Delete_TrustMID(int intTrustMID, int intSchoolMID) { try { pSqlParameter = new SqlParameter[2]; pSqlParameter[0] = new SqlParameter("@TrustMID", SqlDbType.Int); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = intTrustMID; pSqlParameter[1] = new SqlParameter("@SchoolMID", SqlDbType.Int); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = intSchoolMID; strStoredProcName = "usp_tbl_BankAssociation_M_Delete_TrustMID"; int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, strStoredProcName, pSqlParameter); if (iResult > 0) { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return(objResults); } else { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.FAILURE; return(objResults); } } catch (Exception ex) { throw ex; } }
internal void EndTransaction(DatabaseTransaction transaction) { if (_transaction == transaction) { _transaction = null; } }
/// <summary> /// Select all details of JournalVoucherM for selected JournalID from tbl_JournalVoucher_M table /// Created By : Viral, 10/13/2014 /// Modified By : /// </summary> /// <param name="intJournalID"></param> /// <returns></returns> public ApplicationResult JournalVoucherM_Select(string strVoucherCode, int intTrustMID, int intSchoolMID) { try { pSqlParameter = new SqlParameter[3]; pSqlParameter[0] = new SqlParameter("@VoucherCode", SqlDbType.NVarChar); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = strVoucherCode; pSqlParameter[1] = new SqlParameter("@TrustMID", SqlDbType.Int); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = intTrustMID; pSqlParameter[2] = new SqlParameter("@SchoolMID", SqlDbType.Int); pSqlParameter[2].Direction = ParameterDirection.Input; pSqlParameter[2].Value = intSchoolMID; strStoredProcName = "usp_tbl_JournalVoucher_M_Select"; DataTable dtResult = new DataTable(); dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, strStoredProcName, pSqlParameter); ApplicationResult objResults = new ApplicationResult(dtResult); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return(objResults); } catch (Exception ex) { throw ex; } }
public bool DeleteContract(AceContractTracker contract) { DatabaseTransaction transaction = BeginTransaction(); DeleteAceContractTracker(transaction, contract); return(transaction.Commit().Result); }
public void Update(IRegistration registration, long forCustomerId) { using (IDatabaseTransaction unitOfWork = new DatabaseTransaction( )) { _gateway.Execute(Queries.UpdateCustomer(registration, forCustomerId), Queries.UpdateAuthorization(registration, forCustomerId)); unitOfWork.Commit( ); } }
public void Update(IEnumerable <ISlipLease> leases, long forCustomerId) { using (IDatabaseTransaction transaction = new DatabaseTransaction( )) { _gateway.Execute(DatabaseDelete.Where(LeaseTable.CustomerID, forCustomerId)); Insert(leases, forCustomerId); transaction.Commit( ); } }
public Task EnsureTransaction() { if (DatabaseTransaction != null) { return(DatabaseTransaction.EnsureTransactionAsync()); } return(Task.FromResult(new object())); }
private bool DeleteAceContractTrackers(DatabaseTransaction transaction, uint aceObjectId) { var criteria = new Dictionary <string, object> { { "aceObjectId", aceObjectId } }; transaction.AddPreparedDeleteListStatement <ShardPreparedStatement, AceContractTracker>(ShardPreparedStatement.DeleteContractTrackers, criteria); return(true); }
public static void BeginTransaction(IntPtr info) { ObjectAuxiliary.Call <DATATableGateway>(info, (gateway, arguments) => { IDbTransaction transaction = gateway.CreateTransaction(); NSJSObject objective = DatabaseTransaction.New(arguments.VirtualMachine, transaction); arguments.SetReturnValue(objective); }); }
private bool DeleteAceObjectPropertiesSpellBarPositions(DatabaseTransaction transaction, uint aceObjectId) { var criteria = new Dictionary <string, object> { { "aceObjectId", aceObjectId } }; transaction.AddPreparedDeleteListStatement <ShardPreparedStatement, AceObjectPropertiesSpellBarPositions>(ShardPreparedStatement.DeleteSpellBarPositions, criteria); return(true); }
//public BaseService(IDatabaseTransaction databaseTransaction, params IBaseService[] baseServices) //{ // DatabaseTransaction = databaseTransaction; // foreach (var service in baseServices) // { // service.IsChild = true; // service.IsCommitingChanges = false; // var bl = service as BaseService; // if (bl != null) // bl.DatabaseTransaction = databaseTransaction; // } //} public void EnsureTransaction() { if (DatabaseTransaction == null) { throw CreateException(nameof(DatabaseTransaction)); } DatabaseTransaction.EnsureTransaction(); }
public void Update(ICustomer customer) { using (IDatabaseTransaction workUnit = new DatabaseTransaction( )) { _registrationMapper.Update(customer.Registration( ), customer.ID( )); _boatMapper.Update(customer.RegisteredBoats( ), customer.ID( )); _leaseMapper.Update(customer.Leases( ), customer.ID( )); workUnit.Commit( ); } }
/// <summary> /// To Insert details of SectionT in SectionT table /// Created By : NafisaMulla, 12/6/2014 /// Modified By : /// </summary> /// <param name="objSectionTBO"></param> /// <returns></returns> public ApplicationResult SectionT_Insert(SectionTBO objSectionTBO) { try { pSqlParameter = new SqlParameter[6]; pSqlParameter[0] = new SqlParameter("@SectionMID", SqlDbType.Int); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = objSectionTBO.SectionMID; pSqlParameter[1] = new SqlParameter("@SchoolMID", SqlDbType.Int); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = objSectionTBO.SchoolMID; pSqlParameter[2] = new SqlParameter("@MediumMID", SqlDbType.Int); pSqlParameter[2].Direction = ParameterDirection.Input; pSqlParameter[2].Value = objSectionTBO.MediumMID; pSqlParameter[3] = new SqlParameter("@LastModifiedUserID", SqlDbType.Int); pSqlParameter[3].Direction = ParameterDirection.Input; pSqlParameter[3].Value = objSectionTBO.LastModifiedUserID; pSqlParameter[4] = new SqlParameter("@LastModifiedDate", SqlDbType.VarChar); pSqlParameter[4].Direction = ParameterDirection.Input; pSqlParameter[4].Value = objSectionTBO.LastModifiedDate; pSqlParameter[5] = new SqlParameter("@IsDeleted", SqlDbType.Int); pSqlParameter[5].Direction = ParameterDirection.Input; pSqlParameter[5].Value = objSectionTBO.IsDeleted; sSql = "usp_tbl_Section_T_Insert"; int iResult = DatabaseTransaction.ExecuteNonQuery(CommandType.StoredProcedure, sSql, pSqlParameter); if (iResult > 0) { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return(objResults); } else { ApplicationResult objResults = new ApplicationResult(); objResults.status = ApplicationResult.CommonStatusType.FAILURE; return(objResults); } } catch (Exception ex) { throw ex; } finally { objSectionTBO = null; } }
/// <summary> /// To Insert details of JournalVoucherT in tbl_JournalVoucher_T table /// Created By : Viral, 10/13/2014 /// Modified By : /// </summary> /// <param name="objJournalVoucherTBO"></param> /// <returns></returns> public ApplicationResult JournalVoucherT_Insert(JournalVoucherTBO objJournalVoucherTBO) { try { pSqlParameter = new SqlParameter[8]; pSqlParameter[0] = new SqlParameter("@JournalID", SqlDbType.Int); pSqlParameter[0].Direction = ParameterDirection.Input; pSqlParameter[0].Value = objJournalVoucherTBO.JournalID; pSqlParameter[1] = new SqlParameter("@OppositeJournalID", SqlDbType.Int); pSqlParameter[1].Direction = ParameterDirection.Input; pSqlParameter[1].Value = objJournalVoucherTBO.OppositeJournalID; pSqlParameter[2] = new SqlParameter("@Amount", SqlDbType.Float); pSqlParameter[2].Direction = ParameterDirection.Input; pSqlParameter[2].Value = objJournalVoucherTBO.Amount; pSqlParameter[3] = new SqlParameter("@CreatedDate", SqlDbType.NVarChar); pSqlParameter[3].Direction = ParameterDirection.Input; pSqlParameter[3].Value = objJournalVoucherTBO.CreatedDate; pSqlParameter[4] = new SqlParameter("@CreatedUserID", SqlDbType.Int); pSqlParameter[4].Direction = ParameterDirection.Input; pSqlParameter[4].Value = objJournalVoucherTBO.CreatedUserID; pSqlParameter[5] = new SqlParameter("@IsDeleted", SqlDbType.Int); pSqlParameter[5].Direction = ParameterDirection.Input; pSqlParameter[5].Value = objJournalVoucherTBO.IsDeleted; pSqlParameter[6] = new SqlParameter("@LastModifideUserID", SqlDbType.Int); pSqlParameter[6].Direction = ParameterDirection.Input; pSqlParameter[6].Value = objJournalVoucherTBO.LastModifideUserID; pSqlParameter[7] = new SqlParameter("@LastModifideDate", SqlDbType.NVarChar); pSqlParameter[7].Direction = ParameterDirection.Input; pSqlParameter[7].Value = objJournalVoucherTBO.LastModifideDate; sSql = "usp_tbl_JournalVoucher_T_Insert"; DataTable dtResult = new DataTable(); dtResult = DatabaseTransaction.ExecuteDataTable(CommandType.StoredProcedure, sSql, pSqlParameter); ApplicationResult objResults = new ApplicationResult(dtResult); objResults.status = ApplicationResult.CommonStatusType.SUCCESS; return(objResults); } catch (Exception ex) { throw ex; } finally { objJournalVoucherTBO = null; } }
protected override bool SaveObjectDependencies(DatabaseTransaction transaction, AceObject aceObject) { DeleteAceContractTrackers(transaction, aceObject.AceObjectId); SaveAceContractTracker(transaction, aceObject.AceObjectId, aceObject.TrackedContracts.Select(x => x.Value).ToList()); DeleteAceObjectPropertiesSpellBarPositions(transaction, aceObject.AceObjectId); SaveAceObjectPropertiesSpellBarPositions(transaction, aceObject.SpellsInSpellBars); return(true); }
public void Insert(ICustomer customer) { using (IDatabaseTransaction workUnit = new DatabaseTransaction( )) { customer.ChangeIdTo(_gateway.ExecuteScalar(Queries.Insert( ))); _registrationMapper.Insert(customer.Registration( ), customer.ID( )); _boatMapper.Insert(customer.RegisteredBoats( ), customer.ID( )); _leaseMapper.Insert(customer.Leases( ), customer.ID( )); workUnit.Commit( ); } }
internal static void MapProperty(DatabaseTransaction trans, string propertyId, long bavelKey, bool Confident) { using (DatabasePLCommand cmd = new DatabasePLCommand(trans, "PB_PROPERTY_MAPPINGS", "Property_Map")) { cmd.AddParameter("Property_Id", propertyId); cmd.AddParameter("Bavel_Key", bavelKey); cmd.AddParameter("MatchIs_Confident", Confident); cmd.ExecuteNonQuery(); } }
private void AddAndExecute(params StateChange[] changes) { Changes.AddRange(changes); var commands = changes.Select(x => DatabaseProvider.ToDbCommand(GetQuery(x))); foreach (var command in commands) { DatabaseTransaction.ExecuteNonQuery(command); } }