示例#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);
        }
示例#2
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();
            }
        }
示例#3
0
        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();
            }
        }
示例#4
0
        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();
            }
        }
示例#5
0
        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);
        }
示例#6
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);
        }
        public async Task <List <TxnAdjustment> > WebMerchantMultiTxnAdjustmentListSelect()
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebMerchantMultiTxnAdjustmentListSelect", CommandType.StoredProcedure, Parameters);

                var _List = new List <TxnAdjustment>();
                while (execResult.Read())
                {
                    _List.Add(new TxnAdjustment
                    {
                        BatchId            = Convert.ToString(execResult["Batch Id"]),
                        CreationDate       = DateConverter(execResult["Creation Date"]),
                        SelectedAdjTxnCode = Convert.ToString(execResult["Txn Code"]),
                        InvoiceNo          = Convert.ToString(execResult["Invoice No"]),
                        TxnCount           = Convert.ToString(execResult["Txn Cnt"]),
                        BillingTxnAmt      = ConverterDecimal(execResult["Txn Amount"]),
                        SelectedOwner      = Convert.ToString(execResult["Owner"]),
                        SelectedSts        = Convert.ToString(execResult["Status"]),
                    });
                }
                return(_List);
            }
            catch (Exception)
            {
                throw;
            }
        }
示例#8
0
        public async Task <MsgRetriever> WebPinChange(string CardNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[4];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", CardNo);
                Parameters[2]           = new SqlParameter("@UserId", this.GetUserId);
                Parameters[3]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[3].Direction = ParameterDirection.ReturnValue;

                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebPinChange", CommandType.StoredProcedure, Parameters);

                var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                var Descp  = await GetMessageCode(Result);

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#9
0
        public async Task <LocationAcceptListModel> LocationAcceptanceSelect(string AcctNo, string BusnLoc, string CardNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

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

                var reader = await objDataEngine.ExecuteCommandAsync("WebLocationAcceptanceSelect", CommandType.StoredProcedure, Parameters);

                var LocationAccptInfo = new LocationAcceptListModel();
                while (reader.Read())
                {
                    LocationAccptInfo.s_state      = Convert.ToString(reader["BusnLocation"]);
                    LocationAccptInfo.UserId       = Convert.ToString(reader["User Id"]);
                    LocationAccptInfo.CreationDate = DateConverter(reader["Creation Date"]);


                    return(LocationAccptInfo);
                }
                return(new LocationAcceptListModel());
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#10
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();
            }
        }
示例#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();
            }
        }
示例#12
0
        public async Task <List <EventRcptList> > WebNtfyEventRcptListSelect(string ScheduleId)
        {
            var objEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objEngine.InitiateConnection();
                var            list       = new List <EventRcptList>();
                SqlParameter[] Parameters = new SqlParameter[1];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = String.IsNullOrEmpty(ScheduleId) ? new SqlParameter("@EventScheduleId", DBNull.Value) : new SqlParameter("@EventScheduleId", ScheduleId);
                var getObjData = await objEngine.ExecuteCommandAsync("[WebNtfyEventRcptListSelect]", CommandType.StoredProcedure, Parameters);

                while (getObjData.Read())
                {
                    //a1.Id, a1.ContactName, a1.ContactNo, a1.ContentId, a1.ChannelInd, a1.LangInd
                    var item = new EventRcptList
                    {
                        ChannelInd  = ConvertInt(getObjData["ChannelInd"]),
                        ContactName = Convert.ToString(getObjData["ContactName"]),
                        ContactNo   = Convert.ToString(getObjData["ContactNo"]),
                        LangInd     = Convert.ToString(getObjData["LangInd"]),
                        ContentId   = Convert.ToInt64(getObjData["ContentId"]),
                        Id          = Convert.ToInt64(getObjData["Id"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
示例#13
0
        public async Task <MsgRetriever> SavePukalSedut(int accountNo, decimal txnAmt, string UserId)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[4];
                Parameters[0]           = new SqlParameter("@AcctNo", accountNo);
                Parameters[1]           = new SqlParameter("@TxnAmt", txnAmt);
                Parameters[2]           = String.IsNullOrEmpty(UserId)?new SqlParameter("@UserId", DBNull.Value): new SqlParameter("@UserId", UserId);
                Parameters[3]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[3].Direction = ParameterDirection.ReturnValue;
                var execResult = await objDataEngine.ExecuteWithReturnValueAsync("WebPukalSedutMaint", CommandType.StoredProcedure, Parameters);

                var Result = Convert.ToInt32(execResult.Parameters["@RETURN_VALUE"].Value);
                var Descp  = await GetMessageCode(Result);

                return(Descp);
            }
            catch (Exception ex)
            {
                return(new MsgRetriever {
                    desp = ex.Message, flag = 0
                });

                throw ex;
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#14
0
        public async Task <List <TerminalInventory> > TermInventorySelect(TerminalInventory _TerminalInventory)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[2];
            Parameters[0] = new SqlParameter("@TermId", String.IsNullOrEmpty(_TerminalInventory.TerminalId) ? "" : _TerminalInventory.TerminalId);
            Parameters[1] = new SqlParameter("@RefCd", string.IsNullOrEmpty(_TerminalInventory.SelectedTerminalType) ? "" : _TerminalInventory.SelectedTerminalType);

            var execResult     = objDataEngine.ExecuteCommand("WebTermInventorySelect", CommandType.StoredProcedure, Parameters);
            var _TermInventory = new List <TerminalInventory>();

            while (execResult.Read())
            {
                _TermInventory.Add(new TerminalInventory
                {
                    TerminalId           = Convert.ToString(execResult["termid"]),
                    TerminalType         = await BaseClass.WebGetRefLib("TermSts"),
                    SelectedTerminalType = Convert.ToString(execResult["TermType"]),
                    Status         = await BaseClass.WebGetRefLib("TermSts"),
                    SelectedStatus = Convert.ToString(execResult["sts"]),
                    UserId         = Convert.ToString(execResult["UserId"]),
                    Description    = Convert.ToString(execResult["Description"]),
                    Printer        = Convert.ToString(execResult["PrinterId"]),
                    PinPad         = Convert.ToString(execResult["PinPad"]),
                    CreationDate   = DateConverter(execResult["creationdate"])
                });
            }
            objDataEngine.CloseConnection();
            return(_TermInventory);
        }
示例#15
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);
        }
示例#16
0
        public async Task <MsgRetriever> DeleteLocationAcceptance(string AcctNo, string BusnLocation, string CardNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

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

                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebLocationAcceptanceDelete", CommandType.StoredProcedure, Parameters);

                var          Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                MsgRetriever Descp  = await GetMessageCode(Result);

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#17
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);
        }
示例#18
0
        public async Task <MsgRetriever> SaveCardReplacement(CardReplacement CardReplace)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);


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

                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(CardReplace.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", CardReplace.CardNo);
                Parameters[2]           = new SqlParameter("@NewCardNo", SqlDbType.VarChar, 19);
                Parameters[2].Direction = ParameterDirection.Output;
                Parameters[3]           = String.IsNullOrEmpty(CardReplace.ExpiryDate) ? new SqlParameter("@ExpiryDate", DBNull.Value) : new SqlParameter("@ExpiryDate", CardReplace.ExpiryDate);// new SqlParameter("@ExpiryDate", ConvertDatetimeDB(CardReplace.ExpiryDate));
                Parameters[4]           = String.IsNullOrEmpty(CardReplace.SelectedFeeCd) ? new SqlParameter("@FeeCd", DBNull.Value) : new SqlParameter("@FeeCd", CardReplace.SelectedFeeCd);
                Parameters[5]           = String.IsNullOrEmpty(CardReplace.SelectedReasonCode) ? new SqlParameter("@ReasonCd", DBNull.Value) : new SqlParameter("@ReasonCd", CardReplace.SelectedReasonCode);
                Parameters[6]           = String.IsNullOrEmpty(CardReplace.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", CardReplace.Remarks);
                Parameters[7]           = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId);
                Parameters[8]           = String.IsNullOrEmpty(CardReplace.SelectedCardMediaType) ? new SqlParameter("@CardMedia", DBNull.Value) : new SqlParameter("@CardMedia", CardReplace.SelectedCardMediaType);
                Parameters[9]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[9].Direction = ParameterDirection.ReturnValue;
                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebCardReplacementMaint", CommandType.StoredProcedure, Parameters);

                var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
                NewcardNo = Convert.ToString(Cmd.Parameters["@NewCardNo"].Value);
                var Descp = await GetMessageCode(Result);

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#19
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);
        }
示例#20
0
        public async Task <IEnumerable <SelectListItem> > WebGetPymtTxnCd(string GlSettlementCd, string TxnCat)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[3];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = new SqlParameter("@TxnCat", TxnCat);
                Parameters[2] = String.IsNullOrEmpty(GlSettlementCd) ? new SqlParameter("@settleval", DBNull.Value) : new SqlParameter("@settleval", GlSettlementCd);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebGetPymtTxnCd", CommandType.StoredProcedure, Parameters);

                var _List = new List <SelectListItem>();
                while (execResult.Read())
                {
                    _List.Add(new SelectListItem
                    {
                        Text  = Convert.ToString(execResult["Descp"]),
                        Value = Convert.ToString(execResult["TxnCd"])
                    });
                }
                return(_List);
            }
            finally
            {
                objDataEngine.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();
            }
        }
示例#22
0
        public async Task <List <PinMailerBatchList> > GetPinMailerBatchList()
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);

                var execResult = await objDataEngine.ExecuteCommandAsync("PINMailerGetBatch", CommandType.StoredProcedure, Parameters);

                var _PinMailerBatchList = new List <PinMailerBatchList>();

                while (await execResult.ReadAsync())
                {
                    _PinMailerBatchList.Add(new PinMailerBatchList
                    {
                        BatchID      = ConvertToInt(execResult["BatchId"]),
                        CreationDate = DateTimeConverter(execResult["CreationDate"]),
                        Sts          = Convert.ToString(execResult["Sts"]),
                        Count        = ConvertToInt(execResult["Count"])
                    });
                }
                ;
                return(_PinMailerBatchList);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#23
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();
            }
        }
示例#24
0
        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();
            }
        }
示例#25
0
        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();
            }
        }
示例#26
0
        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();
            }
        }
示例#27
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();
            }
        }
示例#28
0
        public async Task <SAP_Cao> SAPGetCAO(string SapNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            objDataEngine.InitiateConnection();
            SqlParameter[] Parameters = new SqlParameter[1];
            Parameters[0] = String.IsNullOrEmpty(SapNo) ? new SqlParameter("@sapNo", DBNull.Value) : new SqlParameter("@sapNo", SapNo);

            var execResult = objDataEngine.ExecuteCommand("WebSAPCAOSelect", CommandType.StoredProcedure, Parameters);
            var _SAP       = new SAP_Cao();

            while (execResult.Read())
            {
                _SAP.CreditLimit = Convert.ToString(execResult["CreditLimit"]);
                _SAP.NIRD        = Convert.ToString(execResult["NIRD"]);
                _SAP.SelectedCreditControlArea = Convert.ToString(execResult["CreditControlArea"]);
                _SAP.SelectedRiskCategory      = Convert.ToString(execResult["RiskCategory"]);
                _SAP.SecurityCreditAmount      = Convert.ToString(execResult["SecureCreditAmt"]);
                _SAP.SelectedPaymentTerms      = Convert.ToString(execResult["PaymtTerm"]);
                _SAP.Authorization             = Convert.ToString(execResult["Authorization"]);
                _SAP.PaymentHistoryRecord      = Convert.ToString(execResult["PaymtHistRec"]);
                _SAP.CreditControlArea         = await BaseClass.WebGetRefLib("City");

                _SAP.PaymentMethodSupplier = await BaseClass.WebGetRefLib("City");

                _SAP.PaymentTerms = await BaseClass.WebGetRefLib("City");

                _SAP.RiskCategory = await BaseClass.WebGetRefLib("City");
            }
            return(_SAP);
        }
示例#29
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);
        }
示例#30
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);
        }