public List <UnionInfo> GetAllUnionInfo() { try { var aaa = _IUoW.Repository <UnionInfo>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.UnionId, n.UnionNm, n.UnionShortNm, n.MakeDT, n.UpazilaId }); var bbb = _IUoW.Repository <UpazilaInfo>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.UpazilaId, n.UpazilaNm }); List <UnionInfo> OBJ_LIST_UnionInfo = aaa.Join(bbb, p => p.UpazilaId, pc => pc.UpazilaId, (p, pc) => new UnionInfo { UnionId = p.UnionId, UnionNm = p.UnionNm, UnionShortNm = p.UnionShortNm, UpazilaNm = pc.UpazilaNm, UpazilaId = p.UpazilaId, MakeDT = p.MakeDT }).ToList(); return(OBJ_LIST_UnionInfo); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAllUnionInfo()", string.Empty); return(null); } }
public AccMaster GetBankAccInfoByWalletAccNo(AccMaster _AccInfo) { AccMaster _Acc_Info = new AccMaster(); CustomerAccProfile _CustomerAccProfile = new CustomerAccProfile(); try { var _accInfo = _IUoW.Repository <AccMaster>().GetBy(x => x.WalletAccountNo == _AccInfo.FromSystemAccountNo && x.AuthStatusId == "A" && x.LastAction != "DEL"); if (_accInfo != null) { if (_accInfo.AccTypeId == "004") { _CustomerAccProfile = _IUoW.Repository <CustomerAccProfile>().GetBy(x => x.SystemAccountNo == _accInfo.SystemAccountNo); if (_CustomerAccProfile != null) { _Acc_Info.FromSystemAccountNo = _CustomerAccProfile.BankAccountNo; } } } return(_Acc_Info); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetBankAccInfoByWalletAccNo(obj)", string.Empty); return(null); } }
public IEnumerable <SelectListItem> GetUpazilaInfoForDD() { try { var List_Upazila_Info = _IUoW.Repository <UpazilaInfo>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.UpazilaId, n.UpazilaNm }); var selectList = new List <SelectListItem>(); foreach (var element in List_Upazila_Info) { selectList.Add(new SelectListItem { Value = element.UpazilaId, Text = element.UpazilaNm }); } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetUpazilaInfoForDD()", string.Empty); return(null); } }
public int AddEOD(EOD _EOD) { try { var _max = _IUoW.Repository <EOD>().GetMaxValue(x => x.EodId) + 1; _EOD.EodId = _max.ToString().PadLeft(3, '0'); _EOD.AuthStatusId = "U"; _EOD.LastAction = "ADD"; _EOD.MakeDT = System.DateTime.Now; _EOD.MakeBy = "mtaka"; var result = _IUoW.Repository <EOD>().Add(_EOD); if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddEOD(obj)", string.Empty); return(0); } }
public int AddChargeDeductCust(ChargeDeductCust _ChargeDeductCust) { try { _ChargeDeductCust.AuthStatusId = "U"; _ChargeDeductCust.LastAction = "ADD"; _ChargeDeductCust.MakeDT = System.DateTime.Now; var result = _IUoW.Repository <ChargeDeductCust>().Add(_ChargeDeductCust); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; _IAuthLogService.AddAuthLog(_IUoW, null, _ChargeDeductCust, "ADD", "0001", "090102003", 1, "ChargeDeductCust", "MTK_CHG_DEDUCT_CUST", "ChargeRuleId", _ChargeDeductCust.ChargeRuleId, "mtaka", _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddChargeRule(obj)", string.Empty); return(0); } }
public int AddAccTypeWiseTarget(AccTypeWiseTarget _AccTypeWiseTarget) { try { var _max = _IUoW.Repository <AccTypeWiseTarget>().GetMaxValue(x => x.TargetSlNo) + 1; _AccTypeWiseTarget.TargetSlNo = _max.ToString().PadLeft(3, '0'); _AccTypeWiseTarget.AuthStatusId = "U"; _AccTypeWiseTarget.LastAction = "ADD"; _AccTypeWiseTarget.MakeDT = System.DateTime.Now; _AccTypeWiseTarget.MakeBy = "mtaka"; var result = _IUoW.Repository <AccTypeWiseTarget>().Add(_AccTypeWiseTarget); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, _AccTypeWiseTarget, "ADD", "0001", _AccTypeWiseTarget.FunctionId, 1, "AccTypeWiseTarget", "MTK_SP_CUS_TYPE", "AccTypeWiseTargetId", _AccTypeWiseTarget.TargetSlNo, _AccTypeWiseTarget.UserName, _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddAccTypeWiseTarget(obj)", string.Empty); return(0); } }
public int CheckStatusWiseService(StatusWiseService _StatusWiseService) { int Check = 0; try { var _Acc_Info = _IUoW.Repository <AccMaster>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL" && x.SystemAccountNo == _StatusWiseService.ToSystemAccountNo); if (_Acc_Info != null) { var _Status_Wise_Service_Map = _IUoW.Repository <StatusWiseService>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL" && x.AccountStatusId == _Acc_Info.AccountStatusId && x.DefineServiceId == _StatusWiseService.DefineServiceId); if (_Status_Wise_Service_Map != null && _Status_Wise_Service_Map.TransactionAllow == "0") { Check = 0; } if (_Status_Wise_Service_Map != null && _Status_Wise_Service_Map.TransactionAllow == "1") { Check = 1; } } return(Check); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "CheckStatusWiseService(obj)", string.Empty); return(Check); } }
public int UpdateReportConfigMaster(ReportConfigMaster _ReportConfiguration) { try { int result = 0; bool IsRecordExist; if (!string.IsNullOrWhiteSpace(_ReportConfiguration.FunctionId)) { IsRecordExist = _IUoW.Repository <ReportConfigMaster>().IsRecordExist(x => x.FunctionId == _ReportConfiguration.FunctionId); if (IsRecordExist) { _ReportConfiguration.GenBeforeEod = _ReportConfiguration.GenBeforeEod == "True" ? "1" : "0"; _ReportConfiguration.AutoGenPeriod = _ReportConfiguration.AutoGenPeriod == "True" ? "1" : "0"; _ReportConfiguration.IsVisible = _ReportConfiguration.IsVisible == "True" ? "1" : "0"; result = _IUoW.Repository <ReportConfigMaster>().Update(_ReportConfiguration); if (result == 1) { _IUoW.Commit(); } return(result); } } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "UpdateReportConfiguration(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetIdentificationTypeForDD() { try { var List_Cus_Group = _IUoW.Repository <IdentificationType>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.IdentificationId, n.IdentificationNM }); var selectList = new List <SelectListItem>(); foreach (var element in List_Cus_Group) { selectList.Add(new SelectListItem { Value = element.IdentificationId, Text = element.IdentificationNM }); } if (selectList != null) { return(selectList); } else { return(null); } //throw new Exception("Invalid"); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetIdentificationTypeForDD()", string.Empty); return(null); } }
public int AddStatusWiseService(StatusWiseService _StatusWiseService) { try { var _max = _IUoW.Repository <StatusWiseService>().GetMaxValue(x => x.StatusWiseServiceId) + 1; _StatusWiseService.StatusWiseServiceId = _max.ToString().PadLeft(3, '0'); _StatusWiseService.AuthStatusId = "U"; _StatusWiseService.LastAction = "ADD"; _StatusWiseService.MakeDT = System.DateTime.Now; _StatusWiseService.MakeBy = "prova"; var result = _IUoW.Repository <StatusWiseService>().Add(_StatusWiseService); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, _StatusWiseService, "ADD", "0001", _StatusWiseService.FunctionId, 1, "StatusWiseService", "MTK_SP_STATUS_WISE_SERVICE", "StatusWiseServiceId", _StatusWiseService.StatusWiseServiceId, _StatusWiseService.UserName, _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddStatusWiseService(obj)", string.Empty); return(0); } }
public int AddAccStatusSetup(AccStatusSetup _AccStatusSetup) { try { var _max = _IUoW.Repository <AccStatusSetup>().GetMaxValue(x => x.AccountStatusId) + 1; _AccStatusSetup.AccountStatusId = _max.ToString().PadLeft(3, '0'); _AccStatusSetup.AuthStatusId = "A"; _AccStatusSetup.LastAction = "ADD"; _AccStatusSetup.MakeDT = System.DateTime.Now; _AccStatusSetup.MakeBy = "mtaka"; var result = _IUoW.Repository <AccStatusSetup>().Add(_AccStatusSetup); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, _AccStatusSetup, "ADD", "0001", _AccStatusSetup.FunctionId, 1, "AccStatusSetup", "MTK_SP_ACC_STATUS_SETUP", "AccountStatusId", _AccStatusSetup.AccountStatusId, _AccStatusSetup.UserName, _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddAccStatusSetup(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetGLLevelForDD() { try { var List_GLLevel = _IUoW.Repository <GLLevel>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.GLLevelSL, n.GLLevelLth }).OrderBy(x => x.GLLevelSL); var selectList = new List <SelectListItem>(); foreach (var element in List_GLLevel) { selectList.Add(new SelectListItem { Value = element.GLLevelSL, Text = element.GLLevelSL + " - " + element.GLLevelLth }); } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetApplPrefixForDD()", string.Empty); return(null); } }
public IEnumerable <SelectListItem> GetApplPrefixForDD() { try { var List_ApplPrefix = _IUoW.Repository <ApplPrefix>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL" && x.ApplType == "GL", n => new { n.APPLStartProfix, n.APPLName }); var selectList = new List <SelectListItem>(); foreach (var element in List_ApplPrefix) { selectList.Add(new SelectListItem { Value = element.APPLStartProfix, Text = element.APPLName }); } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetApplPrefixForDD()", string.Empty); return(null); } }
public int AddUpazilaInfo(UpazilaInfo _UpazilaInfo) { try { var _max = _IUoW.Repository <UpazilaInfo>().GetMaxValue(x => x.UpazilaId) + 1; _UpazilaInfo.UpazilaId = _max.ToString().PadLeft(3, '0'); _UpazilaInfo.AuthStatusId = "A"; _UpazilaInfo.LastAction = "ADD"; _UpazilaInfo.MakeDT = System.DateTime.Now; _UpazilaInfo.MakeBy = "mtaka"; var result = _IUoW.Repository <UpazilaInfo>().Add(_UpazilaInfo); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, _UpazilaInfo, "ADD", "0001", "090101006", 1, "UpazilaInfo", "MTK_CP_UPAZILA_INFO", "UpazilaId", _UpazilaInfo.UpazilaId, "mtaka", _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddUpazilaInfo(obj)", string.Empty); return(0); } }
public int UploadFile(File_Upload _FileUpload) { try { var _max = _IUoW.Repository <File_Upload>().GetMaxValue(x => x.FileId) + 1; _FileUpload.FileId = _max.ToString().PadLeft(3, '0'); _FileUpload.AuthStatusId = "A"; _FileUpload.LastAction = "ADD"; _FileUpload.MakeBy = "mTaka"; _FileUpload.MakeDT = System.DateTime.Now; var result = _IUoW.Repository <File_Upload>().Add(_FileUpload); //#region Auth Log //if (result == 1) //{ // _IAuthLogService = new AuthLogService(); // long _outMaxSlAuthLogDtl = 0; // _IAuthLogService.AddAuthLog(_IUoW, null, _FileUpload, "ADD", "0001", "090102004", 1, "FileUpload", "MTK_SP_ACC_TYPE", "FileUploadId", _FileUpload.FileUploadId, "mtaka", _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); //} //#endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "UploadFile(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetAddress() { try { var List_Address = _IUoW.Repository <Address>().GetBy(x => x.AuthStatusId == "A" , n => new { n.AddressId, n.AddressNm }); var selectList = new List <SelectListItem>(); foreach (var element in List_Address) { selectList.Add(new SelectListItem { Value = element.AddressId, Text = element.AddressNm }); } if (selectList != null) { return(selectList); } else { return(null); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAddress()", string.Empty); return(null); } }
public IEnumerable <SelectListItem> GetDefineServiceUSBForDD() { try { var List_Define_Service = _IUoW.Repository <DefineService>().GetBy(x => x.AuthStatusId == "A" && x.FunctionIdForDefineService == "0006031" && x.LastAction != "DEL", n => new { n.DefineServiceId, n.DefineServiceNm }); var selectList = new List <SelectListItem>(); foreach (var element in List_Define_Service) { selectList.Add(new SelectListItem { Value = element.DefineServiceId, Text = element.DefineServiceNm }); } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetDefineServiceForDD()", string.Empty); return(null); } }
public int UpdateUnionInfo(UnionInfo _UnionInfo) { try { int result = 0; bool IsRecordExist; if (!string.IsNullOrWhiteSpace(_UnionInfo.UnionId)) { IsRecordExist = _IUoW.Repository <UnionInfo>().IsRecordExist(x => x.UnionId == _UnionInfo.UnionId); if (IsRecordExist) { _UnionInfo.AuthStatusId = "U"; _UnionInfo.LastAction = "EDT"; _UnionInfo.LastUpdateDT = System.DateTime.Now; _UnionInfo.MakeBy = "mtaka"; result = _IUoW.Repository <UnionInfo>().Update(_UnionInfo); _IUoW.Commit(); return(result); } } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "UpdateUnionInfo(obj)", string.Empty); return(0); } }
public string IfAccCrossTheBalanceLimit(LedgerMaster _LedgerMaster) { LedgerMaster Channel_Ledger_Master = new LedgerMaster(); try { Channel_Ledger_Master = _IUoW.Repository <LedgerMaster>().GetBy(x => x.SystemAccountNo == _LedgerMaster.SystemAccountNo && x.AccountTypeId == _LedgerMaster.AccountTypeId); decimal _AfterTrnBalance = 0; if (_LedgerMaster.DefineServiceId == "001" || _LedgerMaster.DefineServiceId == "003") { _AfterTrnBalance = Channel_Ledger_Master.ClosingBalance - _LedgerMaster.Amount; } if (_LedgerMaster.DefineServiceId == "002" || _LedgerMaster.DefineServiceId == "004") { _AfterTrnBalance = Channel_Ledger_Master.ClosingBalance + _LedgerMaster.Amount; } if (_AfterTrnBalance > _LedgerMaster.BalanceLimit) { return("asgent has crossed transaction limit"); } else { return("true"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "IfAccCrossTheBalanceLimit(obj)", string.Empty); return(null); } }
public int AddUserActivityLog(UserActivityLog _UserActivityLog) { try { var _max = _IUoW.Repository <UserActivityLog>().GetMaxValue(x => x.SlId) + 1; _UserActivityLog.SlId = _max.ToString().PadLeft(9, '0'); _UserActivityLog.DateTime = System.DateTime.Now; //_UserActivityLog.TransectionDate = Convert.ToDateTime(System.DateTime.Now.ToString("dd/MM/yyyy")); _UserActivityLog.TransectionDate = Convert.ToDateTime(DateTime.Now.ToShortDateString()); //DateTime TransectionDate = Convert.ToDateTime(_UserActivityLog.TransectionDate.ToString("MM/dd/yyyy")); // _UserActivityLog.TransectionDate = Convert.ToDateTime(_UserActivityLog.DateTime.ToString("MM/dd/yyyy")); var result = _IUoW.Repository <UserActivityLog>().Add(_UserActivityLog); if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddUserActivityLog(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetAccBalanceTypeForDD() { try { var List_Account_Balance_Type = _IUoW.Repository <AccBalanceType>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL", n => new { n.BalanceTypeId, n.BalanceTypeName }); var selectList = new List <SelectListItem>(); foreach (var element in List_Account_Balance_Type) { selectList.Add(new SelectListItem { Value = element.BalanceTypeId, Text = element.BalanceTypeName }); } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetAccBalanceTypeForDD()", string.Empty); return(null); } }
public int AddAccCategory(AccCategory _AccCategory) { try { var _max = _IUoW.Repository <AccCategory>().GetMaxValue(x => x.AccCategoryId) + 1; _AccCategory.AccCategoryId = _max.ToString().PadLeft(3, '0'); _AccCategory.AuthStatusId = "U"; _AccCategory.LastAction = "ADD"; _AccCategory.MakeDT = System.DateTime.Now; var result = _IUoW.Repository <AccCategory>().Add(_AccCategory); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; _IAuthLogService.AddAuthLog(_IUoW, null, _AccCategory, "ADD", "0001", _AccCategory.FunctionId, 1, "AccCategory", "MTK_SP_ACC_CATEGORY", "AccCategoryId", _AccCategory.AccCategoryId, _AccCategory.UserName, _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddAccCategory(obj)", string.Empty); return(0); } }
public int AddUSBReportingField(USBReportingField _USBReportingField) { try { var _max = _IUoW.Repository <USBReportingField>().GetMaxValue(x => x.ReportingId) + 1; _USBReportingField.ReportingId = _max.ToString().PadLeft(3, '0'); _USBReportingField.AuthStatusId = "U"; _USBReportingField.LastAction = "ADD"; _USBReportingField.MakeDT = System.DateTime.Now; _USBReportingField.MakeBy = "mtaka"; var result = _IUoW.Repository <USBReportingField>().Add(_USBReportingField); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); result = 1; } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddUSBReportingField(obj)", string.Empty); return(0); } }
public int AddReportConfigMaster(ReportConfigMaster _ReportConfiguration) { try { _ReportConfiguration.GenBeforeEod = _ReportConfiguration.GenBeforeEod == "True" ? "1" : "0"; _ReportConfiguration.AutoGenPeriod = _ReportConfiguration.AutoGenPeriod == "True" ? "1" : "0"; _ReportConfiguration.IsVisible = _ReportConfiguration.IsVisible == "True" ? "1" : "0"; _ReportConfiguration.MakeDt = System.DateTime.Now; var result = _IUoW.Repository <ReportConfigMaster>().Add(_ReportConfiguration); if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddReportConfiguration(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetReportForDD() { try { var List_Report_DB_Con = _IUoW.Repository <ReportConfigMaster>().GetAll(); var selectList = new List <SelectListItem>(); foreach (var element in List_Report_DB_Con) { selectList.Add(new SelectListItem { Value = element.FunctionId, Text = element.ReportName }); } if (selectList != null) { return(selectList); } else { return(null); } //throw new Exception("Invalid"); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetReportForDD()", string.Empty); return(null); } }
public int AddReportConfigParam(List <ReportConfigParam> _ReportConfigurationList) { try { int result = 0; if (_ReportConfigurationList != null && _ReportConfigurationList.Count > 0) { List <ReportConfigParam> List_ReportConfigParam = new List <ReportConfigParam>(); var _max = _IUoW.mTakaDbQuery().MaxSl(_ReportConfigurationList[0].FunctionId) + 1; for (int i = 0; i < _ReportConfigurationList.Count; i++) { ReportConfigParam _ObjReportConfigParam = new ReportConfigParam(); _ObjReportConfigParam.SlNo = _max; _ObjReportConfigParam.IsMandatory = _ReportConfigurationList[i].IsMandatory == "True" ? "1" : "0"; _ObjReportConfigParam.IsVisible = _ReportConfigurationList[i].IsVisible == "True" ? "1" : "0"; _ObjReportConfigParam.IsReadonly = _ReportConfigurationList[i].IsReadonly == "True" ? "1" : "0"; _ObjReportConfigParam.ControlType = _ReportConfigurationList[i].ControlType; _ObjReportConfigParam.DefaultValue = _ReportConfigurationList[i].DefaultValue; _ObjReportConfigParam.FunctionId = _ReportConfigurationList[i].FunctionId; _ObjReportConfigParam.ListSpName = _ReportConfigurationList[i].ListSpName; _ObjReportConfigParam.MaxValue = _ReportConfigurationList[i].MaxValue; _ObjReportConfigParam.MinValue = _ReportConfigurationList[i].MinValue; _ObjReportConfigParam.Parameter = _ReportConfigurationList[i].Parameter; _ObjReportConfigParam.ParameterDatatype = _ReportConfigurationList[i].ParameterDatatype; _ObjReportConfigParam.ParameterMaxlength = _ReportConfigurationList[i].ParameterMaxlength; _ObjReportConfigParam.ParameterName = _ReportConfigurationList[i].ParameterName; _ObjReportConfigParam.ParameterUserAsist = _ReportConfigurationList[i].ParameterUserAsist; _ObjReportConfigParam.AuthStatusId = "U"; _ObjReportConfigParam.LastAction = "ADD"; _ObjReportConfigParam.MakeBy = "mtaka"; _ObjReportConfigParam.MakeDT = System.DateTime.Now; _max += 1; List_ReportConfigParam.Add(_ObjReportConfigParam); } result = _IUoW.Repository <ReportConfigParam>().AddRange(List_ReportConfigParam); if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, List_ReportConfigParam, "ADD", "0001", _ReportConfigurationList[0].FunctionId, 1, "ReportConfigParam", "MTK_RPT_CONFIG_PARAM", "FunctionId", null, "mtaka", _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } } if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddReportConfigParam(obj)", string.Empty); return(0); } }
public int AddTransactionRules(TransactionRules _TransactionRules) { try { var _max = _IUoW.Repository <TransactionRules>().GetMaxValue(x => x.TransactionRuleId) + 1; _TransactionRules.TransactionRuleId = _max.ToString().PadLeft(3, '0'); _TransactionRules.AuthStatusId = "U"; _TransactionRules.LastAction = "ADD"; _TransactionRules.MakeBy = "prova"; _TransactionRules.MakeDT = System.DateTime.Now; #region Switch if (_TransactionRules.TranactionAllowed == "True") { _TransactionRules.TranactionAllowed = "1"; } else { _TransactionRules.TranactionAllowed = "0"; } if (_TransactionRules.commissionAllowed == "True") { _TransactionRules.commissionAllowed = "1"; } else { _TransactionRules.commissionAllowed = "0"; } #endregion _TransactionRules.MakeDT = System.DateTime.Now; var result = _IUoW.Repository <TransactionRules>().Add(_TransactionRules); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; _IAuthLogService.AddAuthLog(_IUoW, null, _TransactionRules, "ADD", "0001", _TransactionRules.FunctionId, 1, "TransactionRules", "MTK_SP_TRANSACTION_RULES", "TransactionRuleId", _TransactionRules.TransactionRuleId, _TransactionRules.UserName, _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddTransactionRules(obj)", string.Empty); return(0); } }
public int AddCommissionSetup(CommissionSetup _CommissionSetup) { try { var _max = _IUoW.Repository <CommissionSetup>().GetMaxValue(x => x.CommissionId) + 1; _CommissionSetup.CommissionId = _max.ToString().PadLeft(8, '0'); _CommissionSetup.AuthStatusId = "A"; _CommissionSetup.LastAction = "ADD"; _CommissionSetup.MakeDT = System.DateTime.Now; _CommissionSetup.MakeBy = "mtaka"; var result = _IUoW.Repository <CommissionSetup>().Add(_CommissionSetup); List <CommissionSetupDTL> objListCommissionSetupDTL = new List <CommissionSetupDTL>(); var _maxCus = _IUoW.Repository <CommissionSetupDTL>().GetMaxValue(x => x.CommissionDtlId) + 1; for (int i = 0; i < _CommissionSetup.ListCommissionSetupDTL.Length; i++) { CommissionSetupDTL _objCommissionSetupDTL = new CommissionSetupDTL(); _objCommissionSetupDTL.CommissionDtlId = _maxCus.ToString().PadLeft(8, '0'); _objCommissionSetupDTL.CommissionId = _CommissionSetup.CommissionId; _objCommissionSetupDTL.AccTypeId = _CommissionSetup.ListCommissionSetupDTL[i].AccTypeId; _objCommissionSetupDTL.CommissionRate = _CommissionSetup.ListCommissionSetupDTL[i].CommissionRate; _objCommissionSetupDTL.AIT = _CommissionSetup.ListCommissionSetupDTL[i].AIT; _objCommissionSetupDTL.AuthStatusId = "U"; _objCommissionSetupDTL.LastAction = "ADD"; _objCommissionSetupDTL.MakeBy = "mTaka"; _objCommissionSetupDTL.MakeDT = System.DateTime.Now; objListCommissionSetupDTL.Add(_objCommissionSetupDTL); _maxCus += 1; } result = _IUoW.Repository <CommissionSetupDTL>().AddRange(objListCommissionSetupDTL); #region Auth Log if (result == 1) { _IAuthLogService = new AuthLogService(); long _outMaxSlAuthLogDtl = 0; result = _IAuthLogService.AddAuthLog(_IUoW, null, _CommissionSetup, "ADD", "0001", _CommissionSetup.FunctionId, 1, "CommissionSetupDTL", "MTK_COMMISSION_SETUP_DTL", "CommisionId", _CommissionSetup.CommissionId, "mtaka", _outMaxSlAuthLogDtl, out _outMaxSlAuthLogDtl); } #endregion if (result == 1) { _IUoW.Commit(); } return(result); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "AddCommissionSetup(obj)", string.Empty); return(0); } }
public IEnumerable <SelectListItem> GetTotalingAccForDD(int level, string prefix) { try { var selectList = new List <SelectListItem>(); if (level > 1) { level -= 1; var List_GLChart = _IUoW.Repository <GLChart>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL" && x.GLLevel == level && x.Postable == 0 && x.GLPrefix == prefix, n => new { n.GLAccSl, n.GLAccNo, n.GLAccName }); foreach (var element in List_GLChart) { selectList.Add(new SelectListItem { Value = element.GLAccSl, Text = element.GLAccNo + " - " + element.GLAccName }); } } else if (prefix == "902" || prefix == "904") { string glType = prefix == "902" ? "A" : "L"; var List_GLChart = _IUoW.Repository <GLChart>().GetBy(x => x.AuthStatusId == "A" && x.LastAction != "DEL" && x.GLLevel == level && x.Postable == 0 && x.GLType == glType, n => new { n.GLAccSl, n.GLAccNo, n.GLAccName }); foreach (var element in List_GLChart) { selectList.Add(new SelectListItem { Value = element.GLAccSl, Text = element.GLAccNo + " - " + element.GLAccName }); } } if (selectList != null) { return(selectList); } else { throw new Exception("Invalid"); } } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetTotalingAccForDD()", string.Empty); return(null); } }
public UpazilaInfo GetUpazilaInfoById(string _UpazilaId) { try { return(_IUoW.Repository <UpazilaInfo>().GetById(_UpazilaId)); } catch (Exception ex) { _ObjErrorLogService = new ErrorLogService(); _ObjErrorLogService.AddErrorLog(ex, string.Empty, "GetUpazilaInfoById(string)", string.Empty); return(null); } }