public void SaveShiftRule(CustomList <ASL.Hr.DAO.ShiftRule> ShiftRuleMasterList, CustomList <ASL.Hr.DAO.ShiftRuleDetail> ShiftRuleDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(ref ShiftRuleMasterList, ref ShiftRuleDetail); Int32 ShiftRuleKey = ShiftRuleMasterList[0].ShiftRuleKey; blnTranStarted = true; if (ShiftRuleMasterList[0].IsAdded) { ShiftRuleKey = Convert.ToInt32(conManager.InsertData(blnTranStarted, ShiftRuleMasterList)); } else { conManager.SaveDataCollectionThroughCollection(blnTranStarted, ShiftRuleMasterList); } var ShiftDetails = (CustomList <ShiftRuleDetail>)ShiftRuleDetail; ShiftDetails.ForEach(x => x.ShiftRuleKey = ShiftRuleKey); conManager.SaveDataCollectionThroughCollection(blnTranStarted, ShiftDetails); ShiftRuleMasterList.AcceptChanges(); ShiftRuleDetail.AcceptChanges(); GetNewShiftRuleID(ref conManager, ref ShiftRuleMasterList, ref ShiftRuleDetail); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, ShiftRuleMasterList, ShiftRuleDetail); ShiftRuleMasterList.AcceptChanges(); ShiftRuleDetail.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SavePromotion(ref CustomList <TransferAndPromotionHistory> PromotionList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); //ReSetSPName(MedicalReinTransList); PromotionList.InsertSpName = "spInsertTransferAndPromotionHistory"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, PromotionList); //object scope_Identity = conManager.InsertData(blnTranStarted, BankKist); PromotionList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveSettings(ref CustomList <Settings> SettingsList) { var conManager = new ConnectionManager(ConnectionName.HR); bool blnTranStarted = false; try { blnTranStarted = true; conManager.BeginTransaction(); ReSetSPName(ref SettingsList); conManager.SaveDataCollectionThroughCollection(blnTranStarted, SettingsList); blnTranStarted = false; conManager.CommitTransaction(); SettingsList.AcceptChanges(); conManager.Dispose(); } catch (Exception ex) { if (blnTranStarted == true) { conManager.RollBack(); conManager.Dispose(); } throw (ex); } }
public void SaveAttManual(ref CustomList <AttendanceManualModification> ModifiedAttList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); //ReSetSPName(DailyAttendenceList); ModifiedAttList.ForEach(f => f.SetAdded()); ModifiedAttList.InsertSpName = "spInsertAttendanceManualModification"; ModifiedAttList.DeleteSpName = "spInsertAttendanceManualModification"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, ModifiedAttList); ModifiedAttList.AcceptChanges(); conManager.CommitTransaction(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { blnTranStarted = false; conManager.Dispose(); } } }
public void SaveLeaveApproval(ref CustomList <LeaveTransApproved> LeaveTransApprovedList, ref CustomList <HourlyLeaveTrans> HourlyLeaveTransList) { var conManager = new ConnectionManager(ConnectionName.HR); bool blnTranStarted = false; try { blnTranStarted = true; conManager.BeginTransaction(); LeaveTransApprovedList.UpdateSpName = "spUpdateLeaveTransApproved"; HourlyLeaveTransList.UpdateSpName = "spUpdateHourlyLeaveTrans"; conManager.SaveDataCollectionThroughCollection(blnTranStarted, LeaveTransApprovedList, HourlyLeaveTransList); blnTranStarted = false; conManager.CommitTransaction(); LeaveTransApprovedList.AcceptChanges(); HourlyLeaveTransList.AcceptChanges(); conManager.Dispose(); } catch (Exception ex) { if (blnTranStarted == true) { conManager.RollBack(); conManager.Dispose(); } throw (ex); } }
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(); } } }
public void DeleteLeaveTransaction(ref CustomList <ASL.Hr.DAO.LeaveTransApproved> LeaveList, ref CustomList <HourlyLeaveTrans> HourlyLeaveList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { ReSetSPName(ref LeaveList, ref HourlyLeaveList); conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, LeaveList, HourlyLeaveList); LeaveList.AcceptChanges(); HourlyLeaveList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
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(); } } }
public void SaveOTAssignment(CustomList <OTAssignment> OTAssignmentList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(OTAssignmentList); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, OTAssignmentList); OTAssignmentList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
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(); } } }
public void SaveTmpAttEmp(ref CustomList <HRM_Emp> TmpAttEmpList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); TmpAttEmpList.ForEach(f => f.SetAdded()); TmpAttEmpList.InsertSpName = "spInsertTmpAttProcess"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, TmpAttEmpList); TmpAttEmpList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
public void SaveDailyAttendece(ref CustomList <DailyAttendance> DailyAttendenceList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(DailyAttendenceList); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, DailyAttendenceList); DailyAttendenceList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void DeleteLeaveRule(ref CustomList <LeaveRuleMaster> LeaveRule, ref CustomList <LeaveRuleDetails> LeaveRuleDetails) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { ReSetSPName(ref LeaveRule); ReSetSPName(ref LeaveRuleDetails); conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, LeaveRule, LeaveRuleDetails); conManager.CommitTransaction(); LeaveRule.AcceptChanges(); LeaveRuleDetails.AcceptChanges(); } catch (Exception ex) { conManager.RollBack(); throw (ex); } finally { if (conManager.IsNotNull()) { blnTranStarted = false; conManager.Dispose(); } } }
public void SaveAbsentList(ref CustomList <AbsentEntry> AbsentEntryList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); blnTranStarted = true; AbsentEntryList.InsertSpName = "spInsertAbsentEntry"; AbsentEntryList.DeleteSpName = "spDeleteAbsentEntry"; conManager.SaveDataCollectionThroughCollection(blnTranStarted, AbsentEntryList); AbsentEntryList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveCompanyPolicies(ref CustomList <HRM_PolicyFileAttach> CompanyPoliciesList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(CompanyPoliciesList); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, CompanyPoliciesList); conManager.CommitTransaction(); CompanyPoliciesList.AcceptChanges(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
//Posting Voucher public void SavePostVoucher(ref CustomList <Acc_Voucher> AccVoucherList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); //ReSetSPName(ref AccVoucherList); spUpdateAcc_VoucherPost AccVoucherList.UpdateSpName = "spUpdateAcc_VoucherPost"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, AccVoucherList); conManager.CommitTransaction(); AccVoucherList.AcceptChanges(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { blnTranStarted = false; conManager.Dispose(); } } }
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(); } } }
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(); } } }
public void DeleteWHCalendar(ref CustomList <OutOfOfficeInfo> OutOfOfficeInfoList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { // ReSetSPName(WHCalEmpList); OutOfOfficeInfoList.DeleteSpName = "spDeleteOutOfOfficeInfo"; conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, OutOfOfficeInfoList); OutOfOfficeInfoList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception ex) { conManager.RollBack(); throw (ex); } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveSalaryRule(ref CustomList <SalaryRuleBackup> SalaryRuleBackupList, ref CustomList <SalaryRule> DeletedSalaryRuleList, ref CustomList <SalaryRule> SalaryRuleList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(SalaryRuleBackupList, DeletedSalaryRuleList, SalaryRuleList); GetNewSalaryRuleCode(ref conManager, ref SalaryRuleBackupList, ref SalaryRuleList); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, SalaryRuleBackupList, DeletedSalaryRuleList, SalaryRuleList); SalaryRuleBackupList.AcceptChanges(); SalaryRuleList.AcceptChanges(); DeletedSalaryRuleList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
public void SaveOutOfOfficeEntry(ref CustomList <OutOfOfficeInfo> lstOutOfOfficeInfo) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); lstOutOfOfficeInfo.InsertSpName = "spInsertOutOfOfficeInfo"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstOutOfOfficeInfo); lstOutOfOfficeInfo.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
public void SaveItemGroupDeptMaping(ref CustomList <ItemGroupDeptMaping> lstItemGroupDeptMaping) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(lstItemGroupDeptMaping); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstItemGroupDeptMaping); lstItemGroupDeptMaping.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
public void DeleteEmp(CustomList <DemoEmpMaster> EmpDetails) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { //ReSetSPName(ref EmpDetails); EmpDetails.DeleteSpName = "spDeleteDemoemp"; conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, EmpDetails); EmpDetails.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
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(); } } }
public void SaveContactInfo(ref CustomList <ContactInfo> ContactInfoList, ref CustomList <ContactDetail> lstContactDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); blnTranStarted = true; ReSetSPName(ContactInfoList, lstContactDetail); conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstContactDetail, ContactInfoList); lstContactDetail.AcceptChanges(); ContactInfoList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
//public CustomList<Gen_LookupEnt> GetAllEvalutionCritaria() //{ // //return Gen_Grade.GetAllGen_Grade(); // return Gen_LookupEnt.GetAllGen_LookupEnt(ASL.Hr.DAO.enumsHr.enumEntitySetup.CVEvalutionCritaria); //} public void SaveFiscalYear(ref CustomList <HRM_EvalItem> 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(); } } }
public void SaveHeadCategory(ref CustomList <AccReportConfigurationHeadCategory> lstHeadCategory) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(lstHeadCategory); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstHeadCategory); lstHeadCategory.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void DeleteShiftRule(CustomList <ASL.Hr.DAO.ShiftRule> ShiftRuleMasterList, CustomList <ASL.Hr.DAO.ShiftRuleDetail> ShiftRuleDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { ReSetSPName(ref ShiftRuleMasterList, ref ShiftRuleDetail); conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, ShiftRuleDetail, ShiftRuleMasterList); ShiftRuleMasterList.AcceptChanges(); ShiftRuleDetail.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception ex) { conManager.RollBack(); throw (ex); } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void DeletelstSalaryRuleBackup(ref CustomList <SalaryRuleBackup> SalaryRuleBackupList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { //ReSetSPName(SalaryRuleBackupList); SalaryRuleBackupList.DeleteSpName = "spDeleteSalaryRuleBackup"; conManager.BeginTransaction(); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, SalaryRuleBackupList); SalaryRuleBackupList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
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(); } } }
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(); } } }
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(); } } }
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(); } } }
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(); } } }
public void SaveBank(ref CustomList<Gen_Bank> BankMasterList, ref CustomList<Bank_Branch> BankBranchList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(BankMasterList, BankBranchList); Int32 bankKey = BankMasterList[0].BankKey; blnTranStarted = true; if (BankMasterList[0].IsAdded) bankKey = Convert.ToInt32(conManager.InsertData(blnTranStarted, BankMasterList)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, BankMasterList); var bankBranch = (CustomList<Bank_Branch>)BankBranchList; bankBranch.ForEach(x => x.BankKey = bankKey); conManager.SaveDataCollectionThroughCollection(blnTranStarted, bankBranch); BankMasterList.AcceptChanges(); BankBranchList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveItemSegment(ref CustomList<SegmentNames> lstSegmentNames, ref CustomList<SegmentValues> lstSegmentValues) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(lstSegmentNames, lstSegmentValues); Int32 SegNameID = lstSegmentNames[0].SegNameID; blnTranStarted = true; if (lstSegmentNames[0].IsAdded) SegNameID = Convert.ToInt32(conManager.InsertData(blnTranStarted, lstSegmentNames)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstSegmentNames); var SegmentValues = (CustomList<SegmentValues>)lstSegmentValues; SegmentValues.ForEach(x => x.SegNameID = SegNameID); conManager.SaveDataCollectionThroughCollection(blnTranStarted, SegmentValues); lstSegmentNames.AcceptChanges(); lstSegmentValues.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveDocListFormat(ref CustomList<CmnDocListFormat> DocListFormatList, ref CustomList<CmnDocListFormatDetail> DocListFormatDetailList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(DocListFormatList, DocListFormatDetailList); Int32 docListFormatKey = DocListFormatList[0].DocListFormatID; blnTranStarted = true; if (DocListFormatList[0].IsAdded) docListFormatKey = Convert.ToInt32(conManager.InsertData(blnTranStarted, DocListFormatList)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, DocListFormatList); var docListFormatDetail = (CustomList<CmnDocListFormatDetail>)DocListFormatDetailList; docListFormatDetail.ForEach(x => x.DocListFormatID = docListFormatKey); conManager.SaveDataCollectionThroughCollection(blnTranStarted, docListFormatDetail); DocListFormatList.AcceptChanges(); DocListFormatDetailList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveItemMaster(ref CustomList<ItemMaster> ItemMasterList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(ItemMasterList); GetNewItemCode(ref conManager, ref ItemMasterList); blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, ItemMasterList); ItemMasterList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void Save(ref CustomList<Acc_COA> list) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); list.InsertSpName = "spInsertAcc_COA"; list.UpdateSpName = "spUpdateAcc_COA"; list.DeleteSpName = "spDeleteAcc_COA"; blnTranStarted = true; conManager.SaveDataCollectionThroughCollection(blnTranStarted, list); conManager.CommitTransaction(); list.AcceptChanges(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
//End //Search Voucher //public CustomList<Acc_Voucher> GetAllAcc_VoucherSearch(string searchStr, string blank) //{ // return Acc_Voucher.GetAllAcc_VoucherSearch(searchStr, blank); //} //end public void SavePFVoucher(ref CustomList<Acc_Voucher> AccVoucherList, ref CustomList<Acc_VoucherDet> AccVoucherDetList, string prifix) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { blnTranStarted = true; conManager.BeginTransaction(); ReSetSPName(ref AccVoucherList, ref AccVoucherDetList); if (AccVoucherList[0].VoucherNo.IsNullOrEmpty()) { GetNewVoucherID(ref conManager, blnTranStarted, ref AccVoucherList, prifix); } else { string[] items = AccVoucherList[0].VoucherNo.Split('-'); if (prifix != items[0]) { string prifix1 = prifix + "-" + items[1]; voucherID = prifix1; AccVoucherList[0].VoucherNo = prifix1; } else voucherID = AccVoucherList[0].VoucherNo; } blnTranStarted = true; if (AccVoucherList[0].IsAdded) { object scope_Identity = conManager.InsertData(blnTranStarted, AccVoucherList); AccVoucherList[0].VoucherKey = Convert.ToInt64(scope_Identity); } else { conManager.SaveDataCollectionThroughCollection(blnTranStarted, AccVoucherList); } CustomList<Acc_VoucherDet> AddedVoucherDetList = AccVoucherDetList.FindAll(f => f.IsAdded); foreach (Acc_VoucherDet aVD in AddedVoucherDetList) { aVD.VoucherKey = AccVoucherList[0].VoucherKey; } conManager.SaveDataCollectionThroughCollection(blnTranStarted, AccVoucherDetList); conManager.CommitTransaction(); AccVoucherList.AcceptChanges(); AccVoucherDetList.AcceptChanges(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { blnTranStarted = false; conManager.Dispose(); } } }
public void SaveContactInfo(ref CustomList<ContactInfo> ContactInfoList, ref CustomList<ContactDetail> lstContactDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); blnTranStarted = true; ReSetSPName(ContactInfoList, lstContactDetail); conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstContactDetail, ContactInfoList); lstContactDetail.AcceptChanges(); ContactInfoList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveContactInfo(ref CustomList<ContactInfo> ContactInfoList, ref CustomList<ContactType> ContactTypeList, ref CustomList<ContactTypeChild> ContactTypeChildList, ref CustomList<ContactDetail> lstContactDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(ContactInfoList, ContactTypeList, ContactTypeChildList); Int32 contactID = ContactInfoList[0].ContactID; blnTranStarted = true; if (ContactInfoList[0].IsAdded) { contactID = Convert.ToInt32(conManager.InsertData(blnTranStarted, ContactInfoList)); ContactInfoList[0].ContactID = contactID; } else conManager.SaveDataCollectionThroughCollection(blnTranStarted, ContactInfoList); foreach (ContactType cT in ContactTypeList) { CustomList<ContactType> ContactType_List = new CustomList<ContactType>(); if (cT.IsAdded) { Int32 contactTypeID = 0; ContactType_List.Add(cT); ContactType_List.InsertSpName = "spInsertContactType"; contactTypeID = Convert.ToInt32(conManager.InsertData(blnTranStarted, ContactType_List)); cT.ContactTypeID = contactTypeID; } if (cT.IsModified) { cT.SetModified(); ContactType_List.Add(cT); ContactType_List.UpdateSpName = "spUpdateContactType"; conManager.SaveDataCollectionThroughCollection(blnTranStarted, ContactType_List); } } CustomList<ContactDetail> ContactDetailList = new CustomList<ContactDetail>(); foreach (ContactType cT in ContactTypeList) { if (cT.IsChecked) { ContactDetail contactDetail = new ContactDetail(); contactDetail.ContactTypeID = cT.ContactTypeID; contactDetail.ContactID = contactID; ContactDetailList.Add(contactDetail); } } foreach (ContactDetail cD in lstContactDetail) { ContactDetail obj = ContactDetailList.Find(f => f.ContactTypeID == cD.ContactTypeID); if (obj.IsNotNull()) obj.SetModified(); else { cD.Delete(); ContactDetailList.Add(cD); } } ReSetSPName(ContactDetailList); conManager.SaveDataCollectionThroughCollection(blnTranStarted, ContactDetailList); ContactInfoList.AcceptChanges(); ContactTypeList.AcceptChanges(); ContactTypeChildList.AcceptChanges(); ContactDetailList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveWorkFlow(ref CustomList<CmnWorkFlowMaster> CmnWorkFlowMasterList, ref CustomList<CmnWorkFlowDetail> CmnWorkFlowDetailList) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(CmnWorkFlowMasterList, CmnWorkFlowDetailList); workFlowID = CmnWorkFlowMasterList[0].WorkFlowID; blnTranStarted = true; if (CmnWorkFlowMasterList[0].IsAdded) workFlowID = Convert.ToInt32(conManager.InsertData(blnTranStarted, CmnWorkFlowMasterList)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, CmnWorkFlowMasterList); CmnWorkFlowDetailList.ForEach(x => x.WorkFlowID = workFlowID); conManager.SaveDataCollectionThroughCollection(blnTranStarted, CmnWorkFlowDetailList); CmnWorkFlowMasterList.AcceptChanges(); CmnWorkFlowDetailList.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveStockTransaction(ref CustomList<StockTransactionMaster> lstStockTransactionMaster, ref CustomList<StockTransactionDetail> lstStockTransactionDetail) { ConnectionManager conManager = new ConnectionManager(ConnectionName.HR); Boolean blnTranStarted = false; try { conManager.BeginTransaction(); ReSetSPName(lstStockTransactionMaster, lstStockTransactionDetail); GetNewStockTransaction(ref conManager, ref lstStockTransactionMaster); Int64 StockTransID = lstStockTransactionMaster[0].StockTransID; blnTranStarted = true; if (lstStockTransactionMaster[0].IsAdded) StockTransID = Convert.ToInt32(conManager.InsertData(blnTranStarted, lstStockTransactionMaster)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstStockTransactionMaster); lstStockTransactionDetail.ForEach(x => x.StockTransID = StockTransID); conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstStockTransactionDetail); lstStockTransactionMaster.AcceptChanges(); lstStockTransactionDetail.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }
public void SaveHKEntry(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; Int32 HKID = HKList[0].HKID; blnTranStarted = true; if (HKList[0].IsAdded) HKID = Convert.ToInt32(conManager.InsertData(blnTranStarted, HKList)); else conManager.SaveDataCollectionThroughCollection(blnTranStarted, HKList); lstChild.ForEach(x => x.HKID = HKID); conManager.SaveDataCollectionThroughCollection(blnTranStarted, lstChild); HKList.AcceptChanges(); lstChild.AcceptChanges(); conManager.CommitTransaction(); blnTranStarted = false; conManager.Dispose(); } catch (Exception Ex) { conManager.RollBack(); throw Ex; } finally { if (conManager.IsNotNull()) { conManager.Dispose(); } } }