Exemplo n.º 1
0
        public async Task <MsgRetriever> SaveBusnLocTerm(BusnLocTerminal _BusnLocTerminal)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[16];
            Parameters[0]  = new SqlParameter("@AcqNo", this.GetAcqNo);
            Parameters[1]  = String.IsNullOrEmpty(_BusnLocTerminal.BusnLocation) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", _BusnLocTerminal.BusnLocation);
            Parameters[2]  = String.IsNullOrEmpty(_BusnLocTerminal.TermId) ? new SqlParameter("@TermId", DBNull.Value) : new SqlParameter("@TermId", _BusnLocTerminal.TermId);
            Parameters[3]  = String.IsNullOrEmpty(_BusnLocTerminal.SelectedStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _BusnLocTerminal.SelectedStatus);
            Parameters[4]  = String.IsNullOrEmpty(_BusnLocTerminal.DeployDate) ? new SqlParameter("@DeployDate", DBNull.Value) : new SqlParameter("@DeployDate", ConvertDatetimeDB(_BusnLocTerminal.DeployDate));
            Parameters[5]  = String.IsNullOrEmpty(_BusnLocTerminal.SaleTerritory) ? new SqlParameter("@SaleTerritory", DBNull.Value) : new SqlParameter("@SaleTerritory", _BusnLocTerminal.SaleTerritory);
            Parameters[6]  = String.IsNullOrEmpty(_BusnLocTerminal.Replacement) ? new SqlParameter("@ReplacedByTermId", DBNull.Value) : new SqlParameter("@ReplacedByTermId", _BusnLocTerminal.Replacement);
            Parameters[7]  = String.IsNullOrEmpty(_BusnLocTerminal.ReplacedDate) ? new SqlParameter("@ReplacedDate", DBNull.Value) : new SqlParameter("@ReplacedDate", ConvertDatetimeDB(_BusnLocTerminal.ReplacedDate));
            Parameters[8]  = String.IsNullOrEmpty(_BusnLocTerminal.SelectedReasonCode) ? new SqlParameter("@ReasonCd", DBNull.Value) : new SqlParameter("@ReasonCd", _BusnLocTerminal.SelectedReasonCode);
            Parameters[9]  = String.IsNullOrEmpty(_BusnLocTerminal.IPEK) ? new SqlParameter("@IPEK", DBNull.Value) : new SqlParameter("@IPEK", _BusnLocTerminal.IPEK);
            Parameters[10] = String.IsNullOrEmpty(_BusnLocTerminal.SelectedProdType) ? new SqlParameter("@DeviceModel", DBNull.Value) : new SqlParameter("@DeviceModel", _BusnLocTerminal.SelectedProdType);
            Parameters[11] = String.IsNullOrEmpty(_BusnLocTerminal.SerialNo) ? new SqlParameter("@SerialNo", DBNull.Value) : new SqlParameter("@SerialNo", _BusnLocTerminal.SerialNo);
            Parameters[12] = String.IsNullOrEmpty(_BusnLocTerminal.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _BusnLocTerminal.Remarks);
            Parameters[13] = String.IsNullOrEmpty(_BusnLocTerminal.SelectedTermType) ? new SqlParameter("@TermType", DBNull.Value) : new SqlParameter("@TermType", _BusnLocTerminal.SelectedTermType);
            Parameters[14] = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId);

            Parameters[15]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[15].Direction = ParameterDirection.ReturnValue;

            var Cmd    = objDataEngine.ExecuteWithReturnValue("WebBusnLocationTerminalMaint", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 2
0
        public async Task <MsgRetriever> WebReloadFundMaint(PurchaseOrder _Order, string Func)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[12];
            Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
            Parameters[1]           = String.IsNullOrEmpty(_Order.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _Order.Remarks);
            Parameters[2]           = String.IsNullOrEmpty(_Order.DocNo) ? new SqlParameter("@DocNo", DBNull.Value) : new SqlParameter("@DocNo", _Order.DocNo);
            Parameters[3]           = new SqlParameter("@AcctNo", _Order.AcctNo);
            Parameters[4]           = new SqlParameter("@Func", Func);
            Parameters[5]           = new SqlParameter("@TxnDate", ConvertDatetimeDB(_Order.TxnDate));
            Parameters[6]           = new SqlParameter("@UserId", this.GetUserId);
            Parameters[7]           = new SqlParameter("@CreatedBy", this.GetUserId);
            Parameters[8]           = Func.ToLower() == "n" ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", ConvertIntToDb(_Order.TxnId));
            Parameters[9]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[9].Direction = ParameterDirection.ReturnValue;
            Parameters[10]          = new SqlParameter("@TxnAmt", ConvertDecimalToDb(_Order.TxnAmt));
            Parameters[11]          = String.IsNullOrEmpty(_Order.SelectedStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _Order.SelectedStatus);
            var Cmd    = objDataEngine.ExecuteWithReturnValue("WebReloadFundMaint", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 3
0
        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);
        }
Exemplo n.º 4
0
        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);
        }
Exemplo n.º 5
0
        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);
        }
Exemplo n.º 6
0
        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);
        }
Exemplo n.º 7
0
        /*
         * 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();
            }
        }
Exemplo n.º 8
0
        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();
            }
        }
Exemplo n.º 9
0
        public async Task <MsgRetriever> WebReloadAllocDetailMaint(PrepaidCardnAcct _PrepaidCardnAcct, int ParentTxnId, string func, string AcctNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();

            SqlParameter[] Parameters = new SqlParameter[14];
            Parameters[0]            = String.IsNullOrEmpty(_PrepaidCardnAcct.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _PrepaidCardnAcct.CardNo);
            Parameters[1]            = String.IsNullOrEmpty(_PrepaidCardnAcct.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _PrepaidCardnAcct.AcctNo);
            Parameters[2]            = String.IsNullOrEmpty(_PrepaidCardnAcct.SelectedStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _PrepaidCardnAcct.SelectedStatus);
            Parameters[3]            = String.IsNullOrEmpty(_PrepaidCardnAcct.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _PrepaidCardnAcct.Remarks);
            Parameters[4]            = String.IsNullOrEmpty(_PrepaidCardnAcct.TxnDate) ? new SqlParameter("@TxnDate", DBNull.Value) : new SqlParameter("@TxnDate", ConvertDatetimeDB(_PrepaidCardnAcct.TxnDate));
            Parameters[5]            = String.IsNullOrEmpty(_PrepaidCardnAcct.TxnAmt) ? new SqlParameter("@TxnAmt", DBNull.Value) : new SqlParameter("@TxnAmt", ConverterDecimal(_PrepaidCardnAcct.TxnAmt));
            Parameters[6]            = new SqlParameter("@UserId", this.GetUserId);
            Parameters[7]            = func.ToLower() == "n" ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", ConvertIntToDb(_PrepaidCardnAcct.TxnId));
            Parameters[8]            = new SqlParameter("@ParentTxnId", ParentTxnId);
            Parameters[9]            = new SqlParameter("@Func", func);
            Parameters[10]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[10].Direction = ParameterDirection.ReturnValue;
            Parameters[11]           = new SqlParameter("@IssNo", GetIssNo);
            Parameters[12]           = String.IsNullOrEmpty(_PrepaidCardnAcct.EffDateFrom) ? new SqlParameter("@EffDateFrom", DBNull.Value) : new SqlParameter("@EffDateFrom", ConvertDatetimeDB(_PrepaidCardnAcct.EffDateFrom));
            Parameters[13]           = new SqlParameter("@CreatedBy", this.GetUserId);

            var Cmd    = objDataEngine.ExecuteWithReturnValue("[WebReloadAllocDetailMaint]", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 10
0
        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();
            }
        }
Exemplo n.º 11
0
        public async Task <MsgRetriever> SaveNonFleetTxn(NonFleetTxn _NonFleetTxn)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[10];
                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(_NonFleetTxn.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _NonFleetTxn.TxnId);
                Parameters[2]           = String.IsNullOrEmpty(_NonFleetTxn.SelectedTxnCd) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _NonFleetTxn.SelectedTxnCd);
                Parameters[3]           = new SqlParameter("@TxnAmt", ConvertDecimalToDb(_NonFleetTxn.TotAmnt));
                Parameters[4]           = new SqlParameter("@TxnDate", DateConverterDB(_NonFleetTxn.TxnDate));
                Parameters[5]           = String.IsNullOrEmpty(_NonFleetTxn.SelectedAffiliate) ? new SqlParameter("@Affiliate", DBNull.Value) : new SqlParameter("@Affiliate", _NonFleetTxn.SelectedAffiliate);
                Parameters[6]           = String.IsNullOrEmpty(_NonFleetTxn.Descp) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _NonFleetTxn.Descp);
                Parameters[7]           = String.IsNullOrEmpty(_NonFleetTxn.remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _NonFleetTxn.remarks);
                Parameters[8]           = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId);
                Parameters[9]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[9].Direction = ParameterDirection.ReturnValue;

                var Cmd    = objDataEngine.ExecuteWithReturnValue("WebNonFleetTxnMaint", CommandType.StoredProcedure, Parameters);
                var Result = ConvertInt(Cmd.Parameters["@RETURN_VALUE"].Value);
                var Descp  = GetMessageCode(Result);

                return(await Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemplo n.º 12
0
        public async Task <MsgRetriever> DelNonFleetTxn(NonFleetTxn _NonFleetTxnDel)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[5];
                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(_NonFleetTxnDel.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _NonFleetTxnDel.TxnId);
                Parameters[2]           = String.IsNullOrEmpty(_NonFleetTxnDel._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _NonFleetTxnDel._CardnAccNo.AccNo);
                Parameters[3]           = String.IsNullOrEmpty(_NonFleetTxnDel._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _NonFleetTxnDel._CardnAccNo.CardNo);
                Parameters[4]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[4].Direction = ParameterDirection.ReturnValue;

                var Cmd    = objDataEngine.ExecuteWithReturnValue("WebTxnAdjustmentDelete", CommandType.StoredProcedure, Parameters);
                var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                var Descp  = GetMessageCode(Result);

                return(await Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemplo n.º 13
0
        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);
        }
Exemplo n.º 14
0
        public async Task <MsgRetriever> SaveManualSlipEntry(ManualSlipEntry _ManualSlipEntry)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[29];

                Parameters[0] = new SqlParameter("@AcqNo", this.GetAcqNo);
                Parameters[1] = new SqlParameter("@TxnCd", ConvertIntToDb(_ManualSlipEntry.SelectedTxnCd));
                Parameters[2] = String.IsNullOrEmpty(_ManualSlipEntry.BusnLocation) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", _ManualSlipEntry.BusnLocation);
                Parameters[3] = String.IsNullOrEmpty(_ManualSlipEntry.SelectedTermId) ? new SqlParameter("@TermId", DBNull.Value) : new SqlParameter("@TermId", _ManualSlipEntry.SelectedTermId);
                Parameters[4] = String.IsNullOrEmpty(_ManualSlipEntry.SiteId) ? new SqlParameter("@SiteId", DBNull.Value) : new SqlParameter("@SiteId", _ManualSlipEntry.SiteId);

                Parameters[5] = String.IsNullOrEmpty(_ManualSlipEntry.SettleId) ? new SqlParameter("@SettleId", DBNull.Value) : new SqlParameter("@SettleId", _ManualSlipEntry.SettleId);
                Parameters[6] = String.IsNullOrEmpty(_ManualSlipEntry.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _ManualSlipEntry.TxnId);
                Parameters[7] = String.IsNullOrEmpty(_ManualSlipEntry.RcptNo) ? new SqlParameter("@RcptNo", DBNull.Value) : new SqlParameter("@RcptNo", _ManualSlipEntry.RcptNo);
                Parameters[8] = new SqlParameter("@InvoiceNo", ConvertIntToDb(_ManualSlipEntry.InvoiceNo));
                Parameters[9] = new SqlParameter("@Stan", ConvertLongToDb(_ManualSlipEntry.Stans));

                Parameters[10] = String.IsNullOrEmpty(_ManualSlipEntry.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _ManualSlipEntry.CardNo);
                Parameters[11] = String.IsNullOrEmpty(_ManualSlipEntry.CardExpire) ? new SqlParameter("@CardExp", DBNull.Value) : new SqlParameter("@CardExp", _ManualSlipEntry.CardExpire);
                Parameters[12] = String.IsNullOrEmpty(_ManualSlipEntry.AuthCardNo) ? new SqlParameter("@AuthCardNo", DBNull.Value) : new SqlParameter("@AuthCardNo", _ManualSlipEntry.AuthCardNo);
                Parameters[13] = String.IsNullOrEmpty(_ManualSlipEntry.AuthCardExp) ? new SqlParameter("@AuthCardExp", DBNull.Value) : new SqlParameter("@AuthCardExp", _ManualSlipEntry.AuthCardExp);
                Parameters[14] = new SqlParameter("@DriverCd", ConvertIntToDb(_ManualSlipEntry.DriverCd));

                Parameters[15] = new SqlParameter("@TxnDate", ConvertDatetimeDB(_ManualSlipEntry.TxnDate));
                Parameters[16] = new SqlParameter("@ArrayCnt", ConvertIntToDb(_ManualSlipEntry.ArrayCnt));
                Parameters[17] = new SqlParameter("@Qty", ConvertDecimalToDb(_ManualSlipEntry.Quantity));
                Parameters[18] = new SqlParameter("@Amt", ConvertDecimalToDb(_ManualSlipEntry.DisplayTotalAmt));
                Parameters[19] = String.IsNullOrEmpty(_ManualSlipEntry.Descp) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _ManualSlipEntry.Descp);

                Parameters[20] = new SqlParameter("@Odometer", ConvertLongToDb(_ManualSlipEntry.Odometer));
                Parameters[21] = new SqlParameter("@Rrn", ConvertLongToDb(_ManualSlipEntry.Rrn));//String.IsNullOrEmpty(_ManualSlipEntry.Rrn) ? new SqlParameter("@Rrn", DBNull.Value) :
                Parameters[22] = String.IsNullOrEmpty(_ManualSlipEntry.AuthNo) ? new SqlParameter("@AuthNo", DBNull.Value) : new SqlParameter("@AuthNo", _ManualSlipEntry.AuthNo);
                Parameters[23] = String.IsNullOrEmpty(_ManualSlipEntry.SelectedSts) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _ManualSlipEntry.SelectedSts);
                Parameters[24] = new SqlParameter("@UserId", this.GetUserId);
                Parameters[25] = String.IsNullOrEmpty(_ManualSlipEntry.VATNo) ? new SqlParameter("@VATNo", DBNull.Value) : new SqlParameter("@VATNo", _ManualSlipEntry.VATNo);
                //Parameters[26] = String.IsNullOrEmpty(_ManualSlipEntry.AppvCd) ? new SqlParameter("@AuthNo", DBNull.Value) : new SqlParameter("@AuthNo", _ManualSlipEntry.AppvCd);
                Parameters[26]           = new SqlParameter("@oTxnId", SqlDbType.VarChar, 19);
                Parameters[26].Direction = ParameterDirection.Output;
                Parameters[27]           = new SqlParameter("@oSettleId", SqlDbType.VarChar, 19);
                Parameters[27].Direction = ParameterDirection.Output;
                Parameters[28]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[28].Direction = ParameterDirection.ReturnValue;

                var Cmd    = objDataEngine.ExecuteWithReturnValue("WebMerchManualTxnMaint", CommandType.StoredProcedure, Parameters);
                var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                this.TxnId    = Convert.ToString(Cmd.Parameters["@oTxnId"].Value);
                this.SettleId = Convert.ToString(Cmd.Parameters["@oSettleId"].Value);
                var Descp = GetMessageCode(Result);
                return(await Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemplo n.º 15
0
        public async Task <MsgRetriever> WebManualTxnValidate(VoiceAuthEntryViewModel ViewModel, List <VoiceAuthProducts> list)
        {
            var dt = new DataTable();

            dt.Columns.Add("Id", typeof(int));
            dt.Columns.Add("ProdCd");
            dt.Columns.Add("Qty", typeof(decimal));
            dt.Columns.Add("AmtPts", typeof(decimal));
            dt.Columns.Add("FastTrack", typeof(decimal));
            dt.Columns.Add("UnitPrice", typeof(decimal));
            dt.Columns.Add("Seq", typeof(int));
            if (list != null)
            {
                for (int i = 0; i < list.Count; i++)
                {
                    var DrRow = dt.NewRow();
                    DrRow["Id"]        = ConvertIntToDb(i + 1);
                    DrRow["ProdCd"]    = list[i].SelectedProdCd;
                    DrRow["Qty"]       = ConvertDecimalToDb(list[i].Qty);
                    DrRow["AmtPts"]    = ConvertDecimalToDb(list[i].AmtPoints);
                    DrRow["FastTrack"] = ConvertDecimalToDb(list[i].FastTrack);
                    DrRow["UnitPrice"] = ConvertDecimalToDb(list[i].UnitPrice);
                    DrRow["Seq"]       = ConvertIntToDb(i + 1);
                    dt.Rows.Add(DrRow);
                }
            }

            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[10];
            Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
            Parameters[1] = new SqlParameter("@AcqNo", "1");
            Parameters[2] = String.IsNullOrEmpty(ViewModel._VoiceAuthDetail.SelectedTxnCd) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", ViewModel._VoiceAuthDetail.SelectedTxnCd);
            Parameters[3] = String.IsNullOrEmpty(ViewModel._VoiceAuthDetail.BusnLocation) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", ViewModel._VoiceAuthDetail.BusnLocation);
            Parameters[4] = String.IsNullOrEmpty(ViewModel._VoiceAuthDetail.TxnAmt) ? new SqlParameter("@Amt", DBNull.Value) : new SqlParameter("@Amt", ConvertDecimalToDb(ViewModel._VoiceAuthDetail.TxnAmt));
            Parameters[5] = String.IsNullOrEmpty(ViewModel._VoiceAuthDetail.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", ViewModel._VoiceAuthDetail.CardNo);
            Parameters[6] = String.IsNullOrEmpty(ViewModel._VoiceAuthDetail.termId) ? new SqlParameter("@TermId", DBNull.Value) : new SqlParameter("@TermId", ViewModel._VoiceAuthDetail.termId);
            Parameters[7] = new SqlParameter("@ProdDetail", dt);
            //1 missing WebManualTxnValidate
            Parameters[8]           = new SqlParameter("@AuthNo", SqlDbType.VarChar, 19);
            Parameters[8].Direction = ParameterDirection.Output;
            Parameters[9]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[9].Direction = ParameterDirection.ReturnValue;

            var Cmd    = objDataEngine.ExecuteWithReturnValue("WebManualTxnValidate", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);

            this.AuthId = Convert.ToString(Cmd.Parameters["@AuthNo"].Value);
            var Descp = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 16
0
        public string SaveUserLogin(Login _userpermit)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Web);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[3];
            SqlCommand     cmd        = new SqlCommand();

            Parameters[0]           = String.IsNullOrEmpty(_userpermit.AppUid) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", _userpermit.AppUid);
            Parameters[1]           = String.IsNullOrEmpty(_userpermit.Password) ? new SqlParameter("@Pw", DBNull.Value) : new SqlParameter("@Pw", _userpermit.Password);
            Parameters[2]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[2].Direction = ParameterDirection.ReturnValue;
            var Cmd    = objDataEngine.ExecuteWithReturnValue("WebUserSignIn", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToString(Cmd.Parameters["@RETURN_VALUE"].Value);

            objDataEngine.CloseConnection();
            return(Result);
        }
Exemplo n.º 17
0
        public async Task <MsgRetriever> WebSAPAcctMaint(SAP _SAP)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[17];
            SqlCommand     cmd        = new SqlCommand();

            Parameters[1] = String.IsNullOrEmpty(_SAP.SapNo) ? new SqlParameter("@SapNo", DBNull.Value) : new SqlParameter("@SapNo", _SAP.SapNo);
            Parameters[2] = String.IsNullOrEmpty(_SAP.SourceRefNo) ? new SqlParameter("@SourceRefNo", DBNull.Value) : new SqlParameter("@SourceRefNo", _SAP.SourceRefNo);
            Parameters[3] = String.IsNullOrEmpty(_SAP.RefKey) ? new SqlParameter("@RefKey", DBNull.Value) : new SqlParameter("@RefKey", _SAP.RefKey);
            Parameters[4] = String.IsNullOrEmpty(_SAP.RefTo) ? new SqlParameter("@RefTo", DBNull.Value) : new SqlParameter("@RefTo", _SAP.RefTo);
            Parameters[5] = String.IsNullOrEmpty(_SAP.AccountName) ? new SqlParameter("@AcctName", DBNull.Value) : new SqlParameter("@AcctName", _SAP.AccountName);
            Parameters[6] = String.IsNullOrEmpty(_SAP.SelectedAccountGroup) ? new SqlParameter("@AcctGroup", DBNull.Value) : new SqlParameter("@AcctGroup", _SAP.SelectedAccountGroup);
            Parameters[7] = String.IsNullOrEmpty(_SAP.TaxId) ? new SqlParameter("@TaxId", DBNull.Value) : new SqlParameter("@TaxId", _SAP.TaxId);
            Parameters[8] = String.IsNullOrEmpty(_SAP.SelectedWithHoldingTax) ? new SqlParameter("@Wht", DBNull.Value) : new SqlParameter("@Wht", _SAP.SelectedWithHoldingTax);
            Parameters[9] = String.IsNullOrEmpty(_SAP.PayeeName) ? new SqlParameter("@PayeeName", DBNull.Value) : new SqlParameter("@PayeeName", _SAP.PayeeName);

            Parameters[10] = String.IsNullOrEmpty(_SAP.SelectedPayeeCd) ? new SqlParameter("@PayeeCd", DBNull.Value) : new SqlParameter("@PayeeCd", _SAP.SelectedPayeeCd);

            Parameters[11] = String.IsNullOrEmpty(_SAP.OldRefKey) ? new SqlParameter("@PrevRefKey", DBNull.Value) : new SqlParameter("@PrevRefKey", _SAP.OldRefKey);

            Parameters[12] = String.IsNullOrEmpty(_SAP.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _SAP.Remarks);

            Parameters[13] = String.IsNullOrEmpty(_SAP.CreatedBy) ? new SqlParameter("@CreatedBy", DBNull.Value) : new SqlParameter("@CreatedBy", _SAP.CreatedBy);

            Parameters[14] = String.IsNullOrEmpty(_SAP.CreationDate) ? new SqlParameter("@CreationDate", DBNull.Value) : new SqlParameter("@CreationDate", BaseClass.ConvertDatetimeDB(_SAP.CreationDate));

            Parameters[15] = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId);

            Parameters[16] = new SqlParameter("@LastUpdDate", ConvertDatetimeDB(DateTime.Now.ToString()));


            Parameters[0]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[0].Direction = ParameterDirection.ReturnValue;


            var Cmd    = objDataEngine.ExecuteWithReturnValue("[WebSAPAcctMaint]", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 18
0
        public async Task <MsgRetriever> ResetInternalUserPassword(string Token, Login Login)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web);

            objDataEngine.InitiateConnection();
            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    = objDataEngine.ExecuteWithReturnValue("WebInternalAdminPassValidate", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 19
0
        public async Task <MsgRetriever> SaveUnsettleTxn(UnsettleTxn _ust)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[14];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = String.IsNullOrEmpty(_ust.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _ust.TxnId);
                Parameters[2] = String.IsNullOrEmpty(_ust.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _ust.AcctNo);

                Parameters[3] = new SqlParameter("@TxnCd", ConvertIntToDb(_ust.TxnCd));
                Parameters[4] = String.IsNullOrEmpty(_ust.TxnDate) ? new SqlParameter("@TxnDate", DBNull.Value) : new SqlParameter("@TxnDate", DateConverterDB(_ust.TxnDate));
                Parameters[5] = String.IsNullOrEmpty(_ust.BookingDate) ? new SqlParameter("@BookingDate", DBNull.Value) : new SqlParameter("@BookingDate", DateConverterDB(_ust.BookingDate));
                Parameters[6] = new SqlParameter("@TxnAmt", ConvertDecimalToDb(_ust.STxnAmt));
                Parameters[7] = String.IsNullOrEmpty(_ust.Descp) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _ust.Descp);
                //      Parameters[8] = String.IsNullOrEmpty(_ust.PayeeName) ? new SqlParameter("@PayeeName ", DBNull.Value) : new SqlParameter("@PayeeName", _ust.PayeeName);
                Parameters[8]            = String.IsNullOrEmpty(_ust.CheqNo) ? new SqlParameter("@CheqNo", DBNull.Value) : new SqlParameter("@CheqNo", _ust.CheqNo);
                Parameters[9]            = String.IsNullOrEmpty(_ust.SelectedSts) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _ust.SelectedSts);
                Parameters[10]           = new SqlParameter("@RcptNo", SqlDbType.BigInt);
                Parameters[10].Direction = ParameterDirection.Output;
                Parameters[11]           = new SqlParameter("@RetCd", SqlDbType.BigInt);
                Parameters[11].Direction = ParameterDirection.Output;
                Parameters[12]           = new SqlParameter("@UserId", this.GetUserId);
                Parameters[13]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[13].Direction = ParameterDirection.ReturnValue;

                var Cmd    = objDataEngine.ExecuteWithReturnValue("WebTxnUnsettleMaint", CommandType.StoredProcedure, Parameters);
                var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                var Descp  = GetMessageCode(Result);
                return(await Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemplo n.º 20
0
        public async Task <MsgRetriever> WebSAPGeneralInfoMaint(SAP_GeneralInfo _SAP, string SapNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[15];
            SqlCommand     cmd        = new SqlCommand();

            Parameters[0] = String.IsNullOrEmpty(SapNo) ? new SqlParameter("@SapNo", DBNull.Value) : new SqlParameter("@SapNo", SapNo);
            Parameters[1] = String.IsNullOrEmpty(_SAP.ReconAccountNo) ? new SqlParameter("@ReconAcctNo", DBNull.Value) : new SqlParameter("@ReconAcctNo", _SAP.ReconAccountNo);

            Parameters[2] = String.IsNullOrEmpty(_SAP.selectedDistributionChannel) ? new SqlParameter("@DistChannel", DBNull.Value) : new SqlParameter("@DistChannel", _SAP.selectedDistributionChannel);
            Parameters[3] = String.IsNullOrEmpty(_SAP.CompanyCd) ? new SqlParameter("@CmpyCd", DBNull.Value) : new SqlParameter("@CmpyCd", _SAP.CompanyCd);
            Parameters[4] = String.IsNullOrEmpty(_SAP.SelectedDivision) ? new SqlParameter("@Division", DBNull.Value) : new SqlParameter("@Division", _SAP.SelectedDivision);
            Parameters[5] = String.IsNullOrEmpty(_SAP.selectedSalesOrganisation) ? new SqlParameter("@SaleOrg", DBNull.Value) : new SqlParameter("@SaleOrg", _SAP.selectedSalesOrganisation);
            Parameters[6] = String.IsNullOrEmpty(_SAP.selectedCustomerClass) ? new SqlParameter("@CustClass", DBNull.Value) : new SqlParameter("@CustClass", _SAP.selectedCustomerClass);
            Parameters[7] = String.IsNullOrEmpty(_SAP.AuthCd) ? new SqlParameter("@Autho", DBNull.Value) : new SqlParameter("@Autho", _SAP.AuthCd);
            Parameters[8] = String.IsNullOrEmpty(_SAP.SearchName) ? new SqlParameter("@SearchTerm1", DBNull.Value) : new SqlParameter("@SearchTerm1", _SAP.SearchName);
            Parameters[9] = String.IsNullOrEmpty(_SAP.SortKey) ? new SqlParameter("@SortKey", DBNull.Value) : new SqlParameter("@SortKey", _SAP.SortKey);

            Parameters[10] = String.IsNullOrEmpty(_SAP.Location) ? new SqlParameter("@Location", DBNull.Value) : new SqlParameter("@Location", _SAP.Location);

            Parameters[11] = String.IsNullOrEmpty(_SAP.SelectedCountryCd) ? new SqlParameter("@CtryCd", DBNull.Value) : new SqlParameter("@CtryCd", _SAP.SelectedCountryCd);
            Parameters[12] = String.IsNullOrEmpty(_SAP.SelectedCurrencyCd) ? new SqlParameter("@CurrCd", DBNull.Value) : new SqlParameter("@CurrCd", _SAP.SelectedCurrencyCd);
            Parameters[13] = String.IsNullOrEmpty(_SAP.SelectedCashManagementGroup) ? new SqlParameter("@CashMgmtGroup", DBNull.Value) : new SqlParameter("@CashMgmtGroup", _SAP.SelectedCashManagementGroup);

            Parameters[14]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[14].Direction = ParameterDirection.ReturnValue;


            var Cmd    = objDataEngine.ExecuteWithReturnValue("[WebSAPGeneralInfoMaint]", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
            var Descp  = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }
Exemplo n.º 21
0
        public async Task <MsgRetriever> SaveBusnLocationGeneralInfo(MerchantDetails merch)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[41];
            Parameters[0]  = new SqlParameter("@Func", GetIssNo);
            Parameters[1]  = new SqlParameter("@AcqNo", this.GetAcqNo);
            Parameters[2]  = String.IsNullOrEmpty(merch.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", merch.AcctNo);
            Parameters[3]  = String.IsNullOrEmpty(merch.BusnLoc) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", merch.BusnLoc);
            Parameters[4]  = String.IsNullOrEmpty(merch.BusinessName) ? new SqlParameter("@BusnName", DBNull.Value) : new SqlParameter("@BusnName", merch.BusinessName);
            Parameters[5]  = String.IsNullOrEmpty(merch.SiteId) ? new SqlParameter("@SiteId", DBNull.Value) : new SqlParameter("@SiteId", merch.SiteId);
            Parameters[6]  = String.IsNullOrEmpty(merch.AgreementNo) ? new SqlParameter("@AgreeNo", DBNull.Value) : new SqlParameter("@AgreeNo", merch.AgreementNo);
            Parameters[7]  = new SqlParameter("@AgreeDate", BaseClass.DateConverterDB(merch.AgreementDate));
            Parameters[8]  = String.IsNullOrEmpty(merch.PersonInCharge) ? new SqlParameter("@PersonInChrg", DBNull.Value) : new SqlParameter("@PersonInChrg", merch.PersonInCharge);
            Parameters[9]  = String.IsNullOrEmpty(merch.selectedOwnershsip) ? new SqlParameter("@Ownership", DBNull.Value) : new SqlParameter("@Ownership", merch.selectedOwnershsip);
            Parameters[10] = String.IsNullOrEmpty(merch.BusnSize) ? new SqlParameter("@Establishment", DBNull.Value) : new SqlParameter("@Establishment", merch.BusnSize);
            Parameters[11] = String.IsNullOrEmpty(merch.SelectedSIC) ? new SqlParameter("@Sic", DBNull.Value) : new SqlParameter("@Sic", merch.SelectedSIC);
            Parameters[12] = String.IsNullOrEmpty(merch.MCC) ? new SqlParameter("@Mcc", DBNull.Value) : new SqlParameter("@Mcc", merch.MCC);
            Parameters[13] = String.IsNullOrEmpty(merch.CoRegNo) ? new SqlParameter("@CoRegNo", DBNull.Value) : new SqlParameter("@CoRegNo", merch.CoRegNo);
            Parameters[14] = String.IsNullOrEmpty(merch.CoRegName) ? new SqlParameter("@CoRegName", DBNull.Value) : new SqlParameter("@CoRegName", merch.CoRegName);
            Parameters[15] = new SqlParameter("@CoRegDate", BaseClass.DateConverterDB(merch.CoRegDate));
            Parameters[16] = new SqlParameter("@OwnershipTrsfDate", BaseClass.DateConverterDB(merch.OwnershipTrsfDate));
            Parameters[17] = String.IsNullOrEmpty(merch.OwnershipTo) ? new SqlParameter("@OwnershipTo", DBNull.Value) : new SqlParameter("@OwnershipTo", merch.OwnershipTo);
            Parameters[18] = String.IsNullOrEmpty(merch.DBAName) ? new SqlParameter("@DBAName", DBNull.Value) : new SqlParameter("@DBAName", merch.DBAName);
            Parameters[19] = String.IsNullOrEmpty(merch.SelectDBARegion) ? new SqlParameter("@DBARegion", DBNull.Value) : new SqlParameter("@DBARegion", merch.SelectDBARegion);
            Parameters[20] = String.IsNullOrEmpty(merch.SelectDBACity) ? new SqlParameter("@DBACity", DBNull.Value) : new SqlParameter("@DBACity", merch.SelectDBACity);
            Parameters[21] = String.IsNullOrEmpty(merch.SelectDBAState) ? new SqlParameter("@DBAState", DBNull.Value) : new SqlParameter("@DBAState", merch.SelectDBAState);
            Parameters[22] = String.IsNullOrEmpty(merch.PayeeName) ? new SqlParameter("@PayeeName", DBNull.Value) : new SqlParameter("@PayeeName", merch.PayeeName);
            Parameters[23] = new SqlParameter("@AutoDebit", BaseClass.ConvertBoolDB(merch.AutoDebitInd));
            Parameters[24] = String.IsNullOrEmpty(merch.BankAcctName) ? new SqlParameter("@BankName", DBNull.Value) : new SqlParameter("@BankName", merch.BankAcctName);
            Parameters[25] = String.IsNullOrEmpty(merch.selectedBankAcctType) ? new SqlParameter("@BankAcctType", DBNull.Value) : new SqlParameter("@BankAcctType", merch.selectedBankAcctType);
            Parameters[26] = String.IsNullOrEmpty(merch.BankAccountNo) ? new SqlParameter("@BankAcctNo", DBNull.Value) : new SqlParameter("@BankAcctNo", merch.BankAccountNo);
            Parameters[27] = String.IsNullOrEmpty(merch.SelectedBankBranchCode) ? new SqlParameter("@BankBranchCd", DBNull.Value) : new SqlParameter("@BankBranchCd", merch.SelectedBankBranchCode);
            Parameters[28] = String.IsNullOrEmpty(merch.selectedCurrentStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", merch.selectedCurrentStatus);
            Parameters[29] = String.IsNullOrEmpty(merch.EntityId) ? new SqlParameter("@EntityId", DBNull.Value) : new SqlParameter("@EntityId", merch.EntityId);
            Parameters[30] = String.IsNullOrEmpty(merch.TaxId) ? new SqlParameter("@TaxId", DBNull.Value) : new SqlParameter("@TaxId", merch.TaxId);
            Parameters[31] = new SqlParameter("@WithholdInd", BaseClass.ConvertBoolDB(merch.WithholdingTaxInd));
            Parameters[32] = String.IsNullOrEmpty(merch.WithholdingTaxRate) ? new SqlParameter("@WithholdRate", DBNull.Value) : new SqlParameter("@WithholdRate", merch.WithholdingTaxRate);
            Parameters[33] = String.IsNullOrEmpty(merch.SelectedcycNo) ? new SqlParameter("@CycNo", DBNull.Value) : new SqlParameter("@CycNo", merch.SelectedcycNo);
            Parameters[34] = new SqlParameter("@UserId", this.GetUserId);
            Parameters[35] = new SqlParameter("@CreationDate", BaseClass.DateConverterDB(merch.CreationDate));
            Parameters[36] = String.IsNullOrEmpty(merch.SelectedReasonCode) ? new SqlParameter("@ReasonCd", DBNull.Value) : new SqlParameter("@ReasonCd", merch.SelectedReasonCode);
            Parameters[37] = new SqlParameter("@StmtPrint", BaseClass.ConvertBoolDB(merch.StmtPrintInd));

            Parameters[38]           = new SqlParameter("@oBusnLocation", SqlDbType.VarChar, 20);
            Parameters[38].Direction = ParameterDirection.Output;
            Parameters[39]           = new SqlParameter("@oEntityId", SqlDbType.VarChar, 20);
            Parameters[39].Direction = ParameterDirection.Output;
            Parameters[40]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
            Parameters[40].Direction = ParameterDirection.ReturnValue;

            var Cmd    = objDataEngine.ExecuteWithReturnValue("WebBusnLocationGeneralInfoMaint", CommandType.StoredProcedure, Parameters);
            var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);

            this.EntityId = Convert.ToString(Cmd.Parameters["@oEntityId"].Value);
            this.BusnLoc  = Convert.ToString(Cmd.Parameters["@oBusnLocation"].Value);
            var Descp = GetMessageCode(Result);

            objDataEngine.CloseConnection();
            return(await Descp);
        }