public async Task <MsgRetriever> SaveLocationAccept(LocationAcceptListModel LocationAcceptance) { MsgRetriever Descp = new MsgRetriever(); var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { if (LocationAcceptance.SelectedStates[0] != "") { foreach (var x in LocationAcceptance.SelectedStates) { objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[7]; Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(LocationAcceptance._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", LocationAcceptance._CardnAccNo.AccNo); Parameters[2] = String.IsNullOrEmpty(LocationAcceptance._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", LocationAcceptance._CardnAccNo.CardNo); Parameters[3] = new SqlParameter("@State", Convert.ToString(x)); Parameters[4] = new SqlParameter("@BusnLocation", DBNull.Value); Parameters[5] = new SqlParameter("@UserId", GetUserId); Parameters[6] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[6].Direction = ParameterDirection.ReturnValue; var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebLocationAcceptanceMaint", CommandType.StoredProcedure, Parameters); var result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); Descp = await GetMessageCode(result); objDataEngine.CloseConnection(); } objDataEngine.CloseConnection(); return(Descp); } else { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[7]; Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(LocationAcceptance._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", LocationAcceptance._CardnAccNo.AccNo); Parameters[2] = String.IsNullOrEmpty(LocationAcceptance._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", LocationAcceptance._CardnAccNo.CardNo); Parameters[3] = new SqlParameter("@State", null); Parameters[4] = String.IsNullOrEmpty(LocationAcceptance.BusnLoc) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", LocationAcceptance.BusnLoc); Parameters[5] = new SqlParameter("@UserId", GetUserId); Parameters[6] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[6].Direction = ParameterDirection.ReturnValue; var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebLocationAcceptanceMaint", CommandType.StoredProcedure, Parameters); var result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); Descp = await GetMessageCode(result); } return(Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <IEnumerable <LookupParameters> > WebProdGroupRefSelect(string ProdGroup) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { await objDataEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[2]; Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = new SqlParameter("@ProdGroup", String.IsNullOrEmpty(ProdGroup) ? (object)DBNull.Value : ProdGroup); var execResult = await objDataEngine.ExecuteCommandAsync("WebProdGroupRefSelect", CommandType.StoredProcedure, Parameters); var _Parameters = new List <LookupParameters>(); while (execResult.Read()) { var _Parameter = new LookupParameters(); _Parameter.SelectedProductGroup = Convert.ToString(execResult["Product Group"]); _Parameter.Descp = Convert.ToString(execResult["Description"]); _Parameter.ProductCode = Convert.ToString(execResult["Product Code"]); _Parameter.ProductName = Convert.ToString(execResult["Product Name"]); _Parameter.SelectedProductCategory = Convert.ToString(execResult["Product Category"]); _Parameter.SelectedProductType = Convert.ToString(execResult["Product Type"]); _Parameter.UnitPrice = ConverterDecimal(execResult["Unit Price"]); _Parameter.LastUpdated = Convert.ToString(execResult["Updated On"]); _Parameter.UserId = Convert.ToString(execResult["Updated By"]); _Parameters.Add(_Parameter); } return(_Parameters); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> UpdatePassword(Login _UserAccess) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Web); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[4]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@UserId", _UserAccess.AppUid); Parameters[1] = new SqlParameter("@OldPass", _UserAccess.OldPassword); Parameters[2] = new SqlParameter("@NewPass", _UserAccess.Password); Parameters[3] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[3].Direction = ParameterDirection.ReturnValue; var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebInternalChangesPassMaint", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); return(Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> SaveWebUserAccessMapping(UserAccess _userAccess, bool isUpdate = true) { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[10]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = new SqlParameter("@UserId", _userAccess.UserId); Parameters[2] = String.IsNullOrEmpty(_userAccess.SelectedMapUserId) ? new SqlParameter("@MapUserId", DBNull.Value) : new SqlParameter("@MapUserId", _userAccess.SelectedMapUserId); Parameters[3] = String.IsNullOrEmpty(_userAccess.Name) ? new SqlParameter("@ContactName", DBNull.Value) : new SqlParameter("@ContactName", _userAccess.Name); Parameters[4] = String.IsNullOrEmpty(_userAccess.ContactNo) ? new SqlParameter("@ContactNo", DBNull.Value) : new SqlParameter("@ContactNo", _userAccess.ContactNo); Parameters[5] = String.IsNullOrEmpty(_userAccess.SelectedDeptId) ? new SqlParameter("@DeptId", DBNull.Value) : new SqlParameter("@DeptId", _userAccess.SelectedDeptId); Parameters[6] = String.IsNullOrEmpty(_userAccess.SelectedAccessInd) ? new SqlParameter("@AccessInd", DBNull.Value) : new SqlParameter("@AccessInd", _userAccess.SelectedAccessInd); Parameters[7] = String.IsNullOrEmpty(_userAccess.EmailAddr) ? new SqlParameter("@EmailAddr", DBNull.Value) : new SqlParameter("@EmailAddr", _userAccess.EmailAddr); Parameters[8] = String.IsNullOrEmpty(_userAccess.Password) ? new SqlParameter("@PwBlock", DBNull.Value) : new SqlParameter("@PwBlock", _userAccess.Password); Parameters[9] = new SqlParameter("@RETURN_VALUE", SqlDbType.TinyInt); Parameters[9].Direction = ParameterDirection.ReturnValue; // Parameters[10] = new SqlParameter("@Flag", isUpdate ? "U" : "N"); var Cmd = objDataEngine.ExecuteWithReturnValue("WebUserAccessMapping", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); return(Descp); } finally { objDataEngine.CloseConnection(); } }
public List <UserAccess> GetUserAccessList(string AccessInd) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Web); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[2]; Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(AccessInd) ? new SqlParameter("@AccessInd", DBNull.Value) : new SqlParameter("@AccessInd", AccessInd); var execResult = objDataEngine.ExecuteCommand("WebUserAccessListSelect", CommandType.StoredProcedure, Parameters); var _GetUserAccessList = new List <UserAccess>(); while (execResult.Read()) { _GetUserAccessList.Add(new UserAccess { UserId = Convert.ToString(execResult["UserId"]), Name = Convert.ToString(execResult["UserName"]), SeletedTitle = Convert.ToString(execResult["Title"]), selectedSts = Convert.ToString(execResult["Status"]), ContactNo = Convert.ToString(execResult["ContactNo"]), EmailAddr = Convert.ToString(execResult["EmailAddress"]), SelectedDeptId = Convert.ToString(execResult["DeptId"]), SelectedAccessInd = Convert.ToString(execResult["AccessInd"]) }); } ; return(_GetUserAccessList); } finally { objDataEngine.CloseConnection(); } }
/* * public async Task<MsgRetriever> SaveMerchManualTxnProduct(ManualSlipEntry _ManualTxnProduct) * { * var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); * * try * { * objDataEngine.InitiateConnection(); * SqlParameter[] Parameters = new SqlParameter[14]; * Parameters[0] = new SqlParameter("@AcqNo", this.GetAcqNo); * Parameters[1] = string.IsNullOrEmpty(_ManualTxnProduct.SettleId) ? new SqlParameter("@SettleId", DBNull.Value) : new SqlParameter("@SettleId", _ManualTxnProduct.SettleId); * Parameters[2] = string.IsNullOrEmpty(_ManualTxnProduct.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _ManualTxnProduct.TxnId); * Parameters[3] = string.IsNullOrEmpty(_ManualTxnProduct.TxnDetailId) ? new SqlParameter("@TxnDetailId", DBNull.Value) : new SqlParameter("@TxnDetailId", _ManualTxnProduct.TxnDetailId); * Parameters[4] = string.IsNullOrEmpty(_ManualTxnProduct.SelectedProdCd) ? new SqlParameter("@ProdCd", DBNull.Value) : new SqlParameter("@ProdCd", _ManualTxnProduct.SelectedProdCd.Split('-').First()); * Parameters[5] = new SqlParameter("@Qty", ConvertDecimalToDb(_ManualTxnProduct.Quantity)); * Parameters[6] = new SqlParameter("@AmtPts", ConvertDecimalToDb(_ManualTxnProduct.ProdAmt)); * Parameters[7] = String.IsNullOrEmpty(_ManualTxnProduct.ProdDesc) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _ManualTxnProduct.ProdDesc); * Parameters[8] = new SqlParameter("@UnitPrice", ConvertDecimalToDb(_ManualTxnProduct.UnitPrice)); * Parameters[9] = new SqlParameter("@UserId", this.GetUserId); * Parameters[10] = String.IsNullOrEmpty(_ManualTxnProduct.VATAmt) ? new SqlParameter("@VATAmt", DBNull.Value) : new SqlParameter("@VATAmt", _ManualTxnProduct.VATAmt); * Parameters[11] = String.IsNullOrEmpty(_ManualTxnProduct.SelectedVATCd) ? new SqlParameter("@VATCd", DBNull.Value) : new SqlParameter("@VATCd", _ManualTxnProduct.SelectedVATCd); * Parameters[12] = new SqlParameter("@oTxnDetailId", SqlDbType.NVarChar, 19); * Parameters[12].Direction = ParameterDirection.Output; * Parameters[13] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); * Parameters[13].Direction = ParameterDirection.ReturnValue; * * var Cmd = objDataEngine.ExecuteWithReturnValue("WebMerchManualTxnDetailMaint", CommandType.StoredProcedure, Parameters); * var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); * this.TxnDetailId = Convert.ToString(Cmd.Parameters["@oTxnDetailId"].Value); * * var Descp = await GetMessageCode(Result); * return Descp; * } * finally * { * objDataEngine.CloseConnection(); * } * * * } */ public async Task <MsgRetriever> MerchManualProductTxnDelete(ManualSlipEntry _TxnProduct) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[6]; Parameters[0] = new SqlParameter("@AcqNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(_TxnProduct.BatchId) ? new SqlParameter("@BatchId", DBNull.Value) : new SqlParameter("@BatchId", _TxnProduct.BatchId); Parameters[2] = String.IsNullOrEmpty(_TxnProduct.SettleId) ? new SqlParameter("@SettleId", DBNull.Value) : new SqlParameter("@SettleId", _TxnProduct.SettleId); Parameters[3] = String.IsNullOrEmpty(_TxnProduct.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _TxnProduct.TxnId); Parameters[4] = String.IsNullOrEmpty(_TxnProduct.TxnDetailId) ? new SqlParameter("@DetailTxnId", DBNull.Value) : new SqlParameter("@DetailTxnId", _TxnProduct.TxnDetailId); Parameters[5] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[5].Direction = ParameterDirection.ReturnValue; var Cmd = objDataEngine.ExecuteWithReturnValue("WebMerchManualTxnDelete", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = GetMessageCode(Result); return(await Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> DelTxnAdjustment(TxnAdjustment _TxnAdjustment) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { await objDataEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[5]; Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(_TxnAdjustment.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _TxnAdjustment.TxnId); Parameters[2] = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _TxnAdjustment._CardnAccNo.AccNo); Parameters[3] = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _TxnAdjustment._CardnAccNo.CardNo); Parameters[4] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[4].Direction = ParameterDirection.ReturnValue; var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebTxnAdjustmentDelete", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); return(Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> WebNegativeUnlockMaint(List <string> RefKey, string RefTo, string Func) { var Dt = new DataTable(); Dt.Columns.Add("refKey"); foreach (var item in RefKey) { var dr = Dt.NewRow(); dr["RefKey"] = item; Dt.Rows.Add(dr); } var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[6]; Parameters[0] = new SqlParameter("@Func", Func); Parameters[1] = new SqlParameter("@IssNo", GetIssNo); Parameters[2] = String.IsNullOrEmpty(RefTo) ? new SqlParameter("@RefTo", DBNull.Value) : new SqlParameter("@RefTo", RefTo); Parameters[3] = new SqlParameter("@RefKey", Dt); Parameters[4] = new SqlParameter("@UserId", this.GetUserId); Parameters[5] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[5].Direction = ParameterDirection.ReturnValue; var Cmd = objDataEngine.ExecuteWithReturnValue("WebNegativeUnlockMaint", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = GetMessageCode(Result); objDataEngine.CloseConnection(); return(await Descp); }
public static async Task <IEnumerable <SelectListItem> > WebGetCycleStmt(string cycNo) { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@CycNo", String.IsNullOrEmpty(cycNo) ? (object)DBNull.Value : cycNo); var getObjData = await objEngine.ExecuteCommandAsync("WebGetCycleStmt", CommandType.StoredProcedure, Parameters); var list = new List <SelectListItem>(); while (getObjData.Read()) { list.Add(new SelectListItem { Text = Convert.ToDateTime(getObjData["StmtDate"]).ToString("yyyy-MM-dd"), Value = Convert.ToString(getObjData["CycStmtId"]) + ":" + Convert.ToDateTime(getObjData["StmtDate"]).ToString("yyyy-MM-dd"), Selected = Convert.ToString(getObjData["StmtDate"]) == "1" ? true : false }); } return(list); }catch (Exception ex) { System.Exception expt = new Exception("Error calls SP", ex); throw expt; }finally { objEngine.CloseConnection(); } }
public List <ReportBrowser> WebRptBrowser(ReportBrowser _Browser) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[2]; Parameters[0] = new SqlParameter("@UserID", GetUserId); Parameters[1] = string.IsNullOrEmpty(_Browser.ReportDate) ? new SqlParameter("@RptDate", DBNull.Value) : new SqlParameter("@RptDate", ConvertDatetimeDB(_Browser.ReportDate)); var execResult = objDataEngine.ExecuteCommand("WebRptBrowser", CommandType.StoredProcedure, Parameters); var _Reports = new List <ReportBrowser>(); while (execResult.Read()) { _Reports.Add(new ReportBrowser { FileName = Convert.ToString(execResult["DiskFileName"]), ReportCategory = Convert.ToString(execResult["RptCategory"]), ReportName = Convert.ToString(execResult["RptName"]) }); } ; return(_Reports); } finally { objDataEngine.CloseConnection(); } }
public List <object> GetRowReport(ReportViewer rpt) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[3]; Parameters[0] = string.IsNullOrEmpty(rpt.SelectedRptType) ? new SqlParameter("@RptType", DBNull.Value) : new SqlParameter("@RptType", rpt.SelectedRptType); Parameters[1] = string.IsNullOrEmpty(rpt.RefKey) ? new SqlParameter("@RefKey", DBNull.Value) : new SqlParameter("@RefKey", rpt.RefKey); Parameters[2] = new SqlParameter("@RptDate", ConvertDatetimeDB(rpt.Date)); var Collector = objDataEngine.FillDataSet("WebRptViewer", CommandType.StoredProcedure, Parameters); var datarow = Collector.Tables[0].AsEnumerable().ToList(); List <object> Rows = new List <object>(); foreach (var x in datarow) { Rows.Add(x.ItemArray); } return(Rows); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> SaveMilestoneMerchant(Milestone _milestone) { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objDataEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[12]; Parameters[0] = new SqlParameter("@Id", ConvertLongToDb(_milestone.ID)); Parameters[1] = String.IsNullOrEmpty(_milestone.SelectedTaskNo) ? new SqlParameter("@TaskNo", DBNull.Value) : new SqlParameter("@TaskNo", _milestone.SelectedTaskNo);//new SqlParameter("@TaskNo", ConvertIntToDb(_milestone.SelectedTaskNo)); Parameters[2] = new SqlParameter("@RefKey", ConvertLongToDb(_milestone.aprId)); Parameters[3] = String.IsNullOrEmpty(_milestone.RefNo) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", _milestone.RefNo); Parameters[4] = String.IsNullOrEmpty(_milestone.selectedOwner) ? new SqlParameter("@Owner", DBNull.Value) : new SqlParameter("@Owner", _milestone.selectedOwner); Parameters[5] = String.IsNullOrEmpty(_milestone.selectedPriority) ? new SqlParameter("@Priority", DBNull.Value) : new SqlParameter("@Priority", _milestone.selectedPriority); //new SqlParameter("@Priority", ConvertIntToDb(_milestone.selectedPriority)); Parameters[6] = String.IsNullOrEmpty(_milestone.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _milestone.Remarks); Parameters[7] = String.IsNullOrEmpty(_milestone.selectedReasonCd) ? new SqlParameter("@ReasonCd", DBNull.Value) : new SqlParameter("@ReasonCd", _milestone.selectedReasonCd); Parameters[8] = new SqlParameter("@RecallDate", ConvertDatetimeDB(_milestone.RecallDate)); Parameters[9] = String.IsNullOrEmpty(_milestone.selectedStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _milestone.selectedStatus); Parameters[10] = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId); Parameters[11] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[11].Direction = ParameterDirection.ReturnValue; var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebMilestoneMerchAdjustmentApproval", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); return(Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <List <TmplDisplayer> > WebEventTypeTemplateSelect(string EventTypeId) { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; Parameters[0] = new SqlParameter("@EventTypeId", EventTypeId); var execResult = await objEngine.ExecuteCommandAsync("WebEventTypeTemplateSelect", CommandType.StoredProcedure, Parameters); var _Parameters = new TmplDisplayer(); var list = new List <TmplDisplayer>(); while (execResult.Read()) { _Parameters = new TmplDisplayer { ContentTmplt = Convert.ToString(execResult["Template Displayer"]), Descp = Convert.ToString(execResult["Descp"]), LangInd = Convert.ToString(execResult["Template Language Indicator"]), Type = Convert.ToString(execResult["Type"]) }; list.Add(_Parameters); } return(list); } finally { objEngine.CloseConnection(); } }
public async Task <List <LookupParameters> > WebEventTypeListSelect() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); var getObjData = await objEngine.ExecuteCommandAsync("[WebEventTypeListSelect]", CommandType.StoredProcedure); var list = new List <LookupParameters>(); while (getObjData.Read()) { var item = new LookupParameters { EventTypeId = Convert.ToString(getObjData["ID"]), SelectedEventType = Convert.ToString(getObjData["Type"]), ShortDescp = Convert.ToString(getObjData["Short Description"]), DetailedDescp = Convert.ToString(getObjData["Detailed Description"]), SelectedStatus = Convert.ToString(getObjData["Status"]), LastUpdated = DateConverter(getObjData["Update Date"]), UpdatedBy = Convert.ToString(getObjData["Update By"]) }; list.Add(item); } return(list); } finally { objEngine.CloseConnection(); } }
public async Task <List <LookupParameters> > WebUndefinedProdType() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@IssNo", GetIssNo); var getObjData = await objEngine.ExecuteCommandAsync("WebUndefinedProdType", CommandType.StoredProcedure, Parameters); var list = new List <LookupParameters>(); while (getObjData.Read()) { var item = new LookupParameters { ProductCode = Convert.ToString(getObjData["ProdCd"]), ProductName = Convert.ToString(getObjData["ProdName"]), Descp = Convert.ToString(getObjData["ProdDescp"]), SelectedProductCategory = Convert.ToString(getObjData["ProdCategory"]), SelectedProductType = Convert.ToString(getObjData["ProdType"]), UnitPrice = ConverterDecimal(getObjData["ProdUnitPrice"]) }; list.Add(item); } return(list); } finally { objEngine.CloseConnection(); } }
public async Task <MsgRetriever> WebSAPSOAInfoMaint(SAP_SOAInfo _SAP, string SapNo) { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[10]; SqlCommand cmd = new SqlCommand(); Parameters[0] = String.IsNullOrEmpty(SapNo) ? new SqlParameter("@SapNo", DBNull.Value) : new SqlParameter("@SapNo", SapNo); Parameters[1] = String.IsNullOrEmpty(_SAP.SelectedAccountType) ? new SqlParameter("@AcctType", DBNull.Value) : new SqlParameter("@AcctType", _SAP.SelectedAccountType); Parameters[2] = String.IsNullOrEmpty(_SAP.SelectedTxnCategory) ? new SqlParameter("@TxnCategory", DBNull.Value) : new SqlParameter("@TxnCategory", _SAP.SelectedTxnCategory); Parameters[3] = new SqlParameter("@LPCFlag", BaseClass.ConvertBoolDB(_SAP.LatePayementChargeFlag)); Parameters[4] = new SqlParameter("@HandlingFeeFlag", BaseClass.ConvertBoolDB(_SAP.HandlingFeeFlag)); Parameters[5] = new SqlParameter("@PayeeCardFlag", BaseClass.ConvertBoolDB(_SAP.PayeeCardFlag)); Parameters[6] = new SqlParameter("@EWTFlag", BaseClass.ConvertBoolDB(_SAP.EWTFlag)); Parameters[7] = String.IsNullOrEmpty(_SAP.priceShieldHours) ? new SqlParameter("@PriceShieldHours", DBNull.Value) : new SqlParameter("@PriceShieldHours", _SAP.priceShieldHours); Parameters[8] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[8].Direction = ParameterDirection.ReturnValue; Parameters[9] = new SqlParameter("@AcctTxnType", DBNull.Value); var Cmd = objDataEngine.ExecuteWithReturnValue("[WebSAPSOAInfoMaint]", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = GetMessageCode(Result); objDataEngine.CloseConnection(); return(await Descp); }
/* * public async Task<MsgRetriever> WebNtfEvtConfDelete(string ScheduleId) * { * SqlParameter[] Parameters = new SqlParameter[2]; * SqlCommand cmd = new SqlCommand(); * var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); * try * { * await objDataEngine.InitiateConnectionAsync(); * Parameters[0] = new SqlParameter("@ScheduleId", ScheduleId); * Parameters[1] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); * Parameters[1].Direction = ParameterDirection.ReturnValue; * var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebNtfEvtConfDelete", CommandType.StoredProcedure, Parameters); * var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); * var Descp = await GetMessageCode(Result); * return Descp; * } * finally * { * objDataEngine.CloseConnection(); * } * } * */ //public async Task<MsgRetriever> WebNtfEvtConfRcptDelete(string @SchRcptId) //{ // SqlParameter[] Parameters = new SqlParameter[2]; // SqlCommand cmd = new SqlCommand(); // var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); // try // { // await objDataEngine.InitiateConnectionAsync(); // Parameters[0] = new SqlParameter("@SchRcptId", @SchRcptId); // Parameters[1] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); // Parameters[1].Direction = ParameterDirection.ReturnValue; // var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebNtfEvtConfRcptDelete", CommandType.StoredProcedure, Parameters); // var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); // var Descp = await GetMessageCode(Result); // return Descp; // } // finally // { // objDataEngine.CloseConnection(); // } //} public async Task <List <LookupParameters> > WebNtfyEventConfSelect(string PlanId) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { await objDataEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; Parameters[0] = new SqlParameter("@EventScheduleId", PlanId); var execResult = await objDataEngine.ExecuteCommandAsync("[WebNtfyEventConfSelect]", CommandType.StoredProcedure, Parameters); var _Parameters = new List <LookupParameters>(); while (execResult.Read()) { var _Parameter = new LookupParameters { BitmapAmt = Convert.ToString(execResult["ParamInd"]), EvtPlanDetailId = Convert.ToString(execResult["EventPlanDetailId"]), EventScheduleId = PlanId, EventTypeId = Convert.ToString(execResult["EventTypeId"]), EventPlanId = Convert.ToString(execResult["EventPlanId"]), DetailedDescp = Convert.ToString(execResult["Descp"]), type = Convert.ToString(execResult["Type"]), TypeDesc = Convert.ToString(execResult["TypeDescp"]), SelectedPriority = Convert.ToString(execResult["Severity"]), SelectedOwner = Convert.ToString(execResult["OwnerType"]), SelectedStatus = Convert.ToString(execResult["Sts"]), SelectedRefTo = Convert.ToString(execResult["Refto"]), RefKey = Convert.ToString(execResult["Refkey"]), CompanyName = Convert.ToString(execResult["CmpyName"]), MaxOccur = Convert.ToString(execResult["MaxOccur"]), SelectedFrequency = Convert.ToString(execResult["OccurPeriodType"]), MinIntVal = Convert.ToString(execResult["MinIntVal"]), MaxIntVal = Convert.ToString(execResult["MaxIntVal"]), MinMoneyVal = ConverterDecimal(execResult["MinMoneyVal"]), MaxMoneyVal = ConverterDecimal(execResult["MaxMoneyVal"]), MinDateVal = DateConverter(execResult["MinDateVal"]), MaxDateVal = DateConverter(execResult["MaxDateVal"]), MinTimeVal = Convert.ToString(execResult["MinTimeVal"]), MaxTimeVal = Convert.ToString(execResult["MaxTimeVal"]), VarCharVal = Convert.ToString(execResult["VarCharVal"]), PeriodType = Convert.ToString(execResult["PeriodType"]), PeriodInterval = Convert.ToString(execResult["PeriodInterval"]), ApplyAllInd = BoolConverter(execResult["AllAppyInd"]), DefaultInd = BoolConverter(execResult["DefaultInd"]), LastUpdated = Convert.ToString(execResult["LastUpdDate"]), UpdatedBy = Convert.ToString(execResult["UserId"]), ParamInd = Convert.ToString(execResult["ParamInd"]), NotifyInd = ConvertInt(execResult["EvtTypeChannelInd"]) }; _Parameters.Add(_Parameter); } return(_Parameters); } finally { objDataEngine.CloseConnection(); } }
public async Task <List <SelectListItem> > WebGetEvtInd() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); var getObjData = await objEngine.ExecuteCommandAsync("[WebGetEvtInd]", CommandType.StoredProcedure); var list = new List <SelectListItem>(); list.Add(new SelectListItem { Text = "", Value = "" }); while (getObjData.Read()) { var item = new SelectListItem { Text = Convert.ToString(getObjData["Descp"]), Value = Convert.ToString(getObjData["RefCd"]), }; list.Add(item); } return(list); } finally { objEngine.CloseConnection(); } }
public async Task <List <MultiPayment> > WebGetGLCode(MultiPayment _multi) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[1]; Parameters[0] = String.IsNullOrEmpty(_multi.SelectedAdjTxnCode) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _multi.SelectedAdjTxnCode); var execResult = await objDataEngine.ExecuteCommandAsync("WebGetGlCode", CommandType.StoredProcedure, Parameters); var _List = new List <MultiPayment>(); while (execResult.Read()) { _List.Add(new MultiPayment { GLTxnCode = Convert.ToString(execResult["AcctTxnCd"]), GLDescp = Convert.ToString(execResult["GLTxnDescp"]), GLCodeDescp = Convert.ToString(execResult["Descp"]) }); } return(_List); } finally { objDataEngine.CloseConnection(); } }
public static async Task <IEnumerable <SelectListItem> > iFrameGetTxnCategory() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; SqlCommand cmd = new SqlCommand(); var getObjData = await objEngine.ExecuteCommandAsync("iFrameGetTxnCategory", CommandType.StoredProcedure); var list = new List <SelectListItem>(); while (getObjData.Read()) { list.Add(new SelectListItem { Text = Convert.ToString(getObjData["Descp"]), Value = Convert.ToString(getObjData["Category"]) }); } if (list.Count > 0) { list.First().Selected = true; } return(list); } finally { objEngine.CloseConnection(); } }
public ManualSlipEntry WebGetManualTxn(string SettleId) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[2]; Parameters[0] = new SqlParameter("@AcqNo", this.GetAcqNo); Parameters[1] = String.IsNullOrEmpty(SettleId) ? new SqlParameter("@SettleId", DBNull.Value) : new SqlParameter("@SettleId", SettleId); var execResult = objDataEngine.ExecuteCommand("WebGetManualTxn", CommandType.StoredProcedure, Parameters); while (execResult.Read()) { var _ManualSlipEntryTxnDetail = new ManualSlipEntry { BusnLocation = Convert.ToString(execResult["Dealer"]), SelectedTermId = Convert.ToString(execResult["Termid"]) }; return(_ManualSlipEntryTxnDetail); } return(new ManualSlipEntry()); } finally { objDataEngine.CloseConnection(); } }
public async static Task <IEnumerable <SelectListItem> > WebGetNonFleetTxnCode() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[1]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@IssNo", 1); var getObjData = await objEngine.ExecuteCommandAsync("WebGetNonFleetTxnCode", CommandType.StoredProcedure, Parameters); var list = new List <SelectListItem>(); while (getObjData.Read()) { list.Add(new SelectListItem { Text = Convert.ToString(getObjData["Descp"]), Value = Convert.ToString(getObjData["TxnCd"]) }); } return(list); } finally { objEngine.CloseConnection(); } }
public List <UserIndexAccess> UserIndexAccess(string UserId) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Web); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[2]; SqlCommand cmd = new SqlCommand(); Parameters[0] = String.IsNullOrEmpty(UserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", UserId); Parameters[1] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[1].Direction = ParameterDirection.ReturnValue; var execResult = objDataEngine.ExecuteCommand("WebGetIndexAccess", CommandType.StoredProcedure, Parameters); var userAccessList = new List <UserIndexAccess>(); while (execResult.Read()) { var userAccess = new UserIndexAccess() { url = Convert.ToString(execResult["url"]), descp = Convert.ToString(execResult["Descp"]), attrId = Convert.ToString(execResult["attrid"]), icon = Convert.ToString(execResult["icon"]) }; userAccessList.Add(userAccess); } objDataEngine.CloseConnection(); return(userAccessList); }
public async static Task <IEnumerable <SelectListItem> > WebUserAccessListSelect(string AccessInd = "I") { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web); try { await objEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[2]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@IssNo", "1"); Parameters[1] = String.IsNullOrEmpty(AccessInd) ? new SqlParameter("@AccessInd", DBNull.Value) : new SqlParameter("@AccessInd", AccessInd); var getObjData = await objEngine.ExecuteCommandAsync("WebUserAccessListSelect", CommandType.StoredProcedure, Parameters); var list = new List <SelectListItem>(); while (getObjData.Read()) { list.Add(new SelectListItem { Text = Convert.ToString(getObjData["UserId"]), Value = Convert.ToString(getObjData["UserId"]) }); } return(list); } finally { objEngine.CloseConnection(); } }
public string SaveUserPasswordConfirm(forgetPassword _UserPassConfirm) { var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Web); try { objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[6]; SqlCommand cmd = new SqlCommand(); Parameters[0] = new SqlParameter("@IssNo", GetIssNo); Parameters[1] = String.IsNullOrEmpty(_UserPassConfirm.EmailAddr) ? new SqlParameter("@EmailAddr", DBNull.Value) : new SqlParameter("@EmailAddr", _UserPassConfirm.EmailAddr); Parameters[2] = String.IsNullOrEmpty(_UserPassConfirm.password) ? new SqlParameter("@Pw", DBNull.Value) : new SqlParameter("@Pw", _UserPassConfirm.password); Parameters[3] = String.IsNullOrEmpty(_UserPassConfirm.secureCd) ? new SqlParameter("@SecureCd", DBNull.Value) : new SqlParameter("@SecureCd", _UserPassConfirm.secureCd); Parameters[4] = String.IsNullOrEmpty(_UserPassConfirm.IpAddr) ? new SqlParameter("@IPAddr", DBNull.Value) : new SqlParameter("@IPAddr", _UserPassConfirm.IpAddr); Parameters[5] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[5].Direction = ParameterDirection.ReturnValue; var Cmd = objDataEngine.ExecuteWithReturnValue("WebUserAccessPwMaint", CommandType.StoredProcedure, Parameters); var Result = Convert.ToString(Cmd.Parameters["@RETURN_VALUE"].Value); return(Result); } finally { objDataEngine.CloseConnection(); } }
public async static Task <IEnumerable <SelectListItem> > WebGetMap() { var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web); try { await objEngine.InitiateConnectionAsync(); SqlCommand cmd = new SqlCommand(); var getObjData = await objEngine.ExecuteCommandAsync("WebGetMapId", CommandType.StoredProcedure); var list = new List <SelectListItem>(); while (getObjData.Read()) { list.Add(new SelectListItem { Text = Convert.ToString(getObjData["User Id"]), Value = Convert.ToString(getObjData["User Id"]) }); } return(list); } finally { objEngine.CloseConnection(); } }
public async Task <MsgRetriever> ResetInternalUserPassword(string Token, Login Login) { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web); try { await objDataEngine.InitiateConnectionAsync(); SqlParameter[] Parameters = new SqlParameter[3]; SqlCommand cmd = new SqlCommand(); Parameters[0] = String.IsNullOrEmpty(Token) ? new SqlParameter("@Token", DBNull.Value) : new SqlParameter("@Token", Token); Parameters[1] = String.IsNullOrEmpty(Login.Password) ? new SqlParameter("@NewPass", DBNull.Value) : new SqlParameter("@NewPass", Login.Password); Parameters[2] = new SqlParameter("@RETURN_VALUE", SqlDbType.TinyInt); Parameters[2].Direction = ParameterDirection.ReturnValue; // Parameters[10] = new SqlParameter("@Flag", isUpdate ? "U" : "N"); var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebInternalAdminPassValidate", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); return(Descp); } finally { objDataEngine.CloseConnection(); } }
public async Task <MsgRetriever> WebSAPSalesTerritoryMaint(SAP_SalesTerritory _SAP, string SapNo) { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[11]; SqlCommand cmd = new SqlCommand(); Parameters[0] = String.IsNullOrEmpty(SapNo) ? new SqlParameter("@SapNo", DBNull.Value) : new SqlParameter("@SapNo", SapNo); Parameters[1] = String.IsNullOrEmpty(_SAP.SelectedSalesTerritoryCd) ? new SqlParameter("@SalesTerritoryCd", DBNull.Value) : new SqlParameter("@SalesTerritoryCd", _SAP.SelectedSalesTerritoryCd); Parameters[2] = String.IsNullOrEmpty(_SAP.CustomerPricingProc) ? new SqlParameter("@CustPricingProc", DBNull.Value) : new SqlParameter("@CustPricingProc", _SAP.CustomerPricingProc); Parameters[3] = String.IsNullOrEmpty(_SAP.SelectedCustoemrStatsGroup) ? new SqlParameter("@CustStatisticGroup", DBNull.Value) : new SqlParameter("@CustStatisticGroup", _SAP.SelectedCustoemrStatsGroup); Parameters[4] = String.IsNullOrEmpty(_SAP.SelectedSalesDistrict) ? new SqlParameter("@SalesDistrict", DBNull.Value) : new SqlParameter("@SalesDistrict", _SAP.SelectedSalesDistrict); Parameters[5] = String.IsNullOrEmpty(_SAP.SalesOfficer) ? new SqlParameter("@SalesOffice", DBNull.Value) : new SqlParameter("@SalesOffice", _SAP.SalesOfficer); Parameters[6] = String.IsNullOrEmpty(_SAP.ShippingConditions) ? new SqlParameter("@ShippingCondition", DBNull.Value) : new SqlParameter("@ShippingCondition", _SAP.ShippingConditions); Parameters[7] = String.IsNullOrEmpty(_SAP.MaxPartialDelivery) ? new SqlParameter("@MaxPartialDelivery", DBNull.Value) : new SqlParameter("@MaxPartialDelivery", _SAP.MaxPartialDelivery); Parameters[8] = String.IsNullOrEmpty(_SAP.OrderCombiation) ? new SqlParameter("@OrderCombination", DBNull.Value) : new SqlParameter("@OrderCombination", _SAP.OrderCombiation); Parameters[9] = String.IsNullOrEmpty(_SAP.SelectedTaxClass) ? new SqlParameter("@TaxClass", DBNull.Value) : new SqlParameter("@TaxClass", _SAP.SelectedTaxClass); Parameters[10] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[10].Direction = ParameterDirection.ReturnValue; var Cmd = objDataEngine.ExecuteWithReturnValue("[WebSAPSalesTerritoryMaint]", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = GetMessageCode(Result); objDataEngine.CloseConnection(); return(await Descp); }
public async Task <MsgRetriever> RecoverInternalPassword(string userId) { var Email = IsValid(userId); var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[3]; SqlCommand cmd = new SqlCommand(); if (Email) { Parameters[0] = new SqlParameter("@UserId", DBNull.Value); Parameters[1] = new SqlParameter("@Email", userId); } else { Parameters[0] = new SqlParameter("@UserId", userId); Parameters[1] = new SqlParameter("@Email", DBNull.Value); } Parameters[2] = new SqlParameter("@RETURN_VALUE", SqlDbType.TinyInt); Parameters[2].Direction = ParameterDirection.ReturnValue; // Parameters[10] = new SqlParameter("@Flag", isUpdate ? "U" : "N"); var Cmd = objDataEngine.ExecuteWithReturnValue("WebInternalForgetPassMaint", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = await GetMessageCode(Result); objDataEngine.CloseConnection(); return(Descp); }
public async Task <MsgRetriever> WebSAPCAOMaint(SAP_Cao _CAO, string SapNo) //[WebSAPCAOMaint] { var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint); objDataEngine.InitiateConnection(); SqlParameter[] Parameters = new SqlParameter[13]; SqlCommand cmd = new SqlCommand(); Parameters[0] = String.IsNullOrEmpty(SapNo) ? new SqlParameter("@SapNo", DBNull.Value) : new SqlParameter("@SapNo", SapNo); Parameters[1] = String.IsNullOrEmpty(_CAO.CreditLimit) ? new SqlParameter("@CrLimit", DBNull.Value) : new SqlParameter("@CrLimit", _CAO.CreditLimit); Parameters[2] = String.IsNullOrEmpty(_CAO.NIRD) ? new SqlParameter("@NIRD", DBNull.Value) : new SqlParameter("@NIRD", ConvertToDatetimeDB(_CAO.NIRD)); Parameters[3] = String.IsNullOrEmpty(_CAO.SelectedCreditControlArea) ? new SqlParameter("@CrCtrlArea", DBNull.Value) : new SqlParameter("@CrCtrlArea", _CAO.SelectedCreditControlArea); Parameters[4] = String.IsNullOrEmpty(_CAO.SelectedRiskCategory) ? new SqlParameter("@RiskCategory", DBNull.Value) : new SqlParameter("@RiskCategory", _CAO.SelectedRiskCategory); Parameters[5] = String.IsNullOrEmpty(_CAO.SecurityCreditAmount) ? new SqlParameter("@SecureCreditAmt", DBNull.Value) : new SqlParameter("@SecureCreditAmt", _CAO.SecurityCreditAmount); Parameters[6] = String.IsNullOrEmpty(_CAO.SelectedPaymentTerms) ? new SqlParameter("@PaymtTerm", DBNull.Value) : new SqlParameter("@PaymtTerm", _CAO.SelectedPaymentTerms); Parameters[7] = String.IsNullOrEmpty(_CAO.DBLInvoice) ? new SqlParameter("@DBLInvoiceNo", DBNull.Value) : new SqlParameter("@DBLInvoiceNo", _CAO.DBLInvoice); Parameters[8] = String.IsNullOrEmpty(_CAO.SelectedPaymentMethodSupplier) ? new SqlParameter("@PaymtMethodSupplier", DBNull.Value) : new SqlParameter("@PaymtMethodSupplier", _CAO.SelectedPaymentMethodSupplier); Parameters[9] = String.IsNullOrEmpty(_CAO.Authorization) ? new SqlParameter("@Authorization", DBNull.Value) : new SqlParameter("@Authorization", _CAO.Authorization); Parameters[10] = new SqlParameter("@InterestFlag", BaseClass.ConvertBoolDB(_CAO.InterestFlag)); Parameters[11] = String.IsNullOrEmpty(_CAO.PaymentHistoryRecord) ? new SqlParameter("@PaymtHistRec", DBNull.Value) : new SqlParameter("@PaymtHistRec", _CAO.PaymentHistoryRecord); Parameters[12] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt); Parameters[12].Direction = ParameterDirection.ReturnValue; var Cmd = objDataEngine.ExecuteWithReturnValue("[WebSAPCAOMaint]", CommandType.StoredProcedure, Parameters); var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value); var Descp = GetMessageCode(Result); objDataEngine.CloseConnection(); return(await Descp); }