Exemple #1
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();
            }
        }
        public async Task <IEnumerable <LookupParameters> > WebProdGroupRefSelect(string ProdGroup)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[2];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = new SqlParameter("@ProdGroup", String.IsNullOrEmpty(ProdGroup) ? (object)DBNull.Value : ProdGroup);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebProdGroupRefSelect", CommandType.StoredProcedure, Parameters);

                var _Parameters = new List <LookupParameters>();
                while (execResult.Read())
                {
                    var _Parameter = new LookupParameters();
                    _Parameter.SelectedProductGroup = Convert.ToString(execResult["Product Group"]);
                    _Parameter.Descp                   = Convert.ToString(execResult["Description"]);
                    _Parameter.ProductCode             = Convert.ToString(execResult["Product Code"]);
                    _Parameter.ProductName             = Convert.ToString(execResult["Product Name"]);
                    _Parameter.SelectedProductCategory = Convert.ToString(execResult["Product Category"]);
                    _Parameter.SelectedProductType     = Convert.ToString(execResult["Product Type"]);
                    _Parameter.UnitPrice               = ConverterDecimal(execResult["Unit Price"]);
                    _Parameter.LastUpdated             = Convert.ToString(execResult["Updated On"]);
                    _Parameter.UserId                  = Convert.ToString(execResult["Updated By"]);
                    _Parameters.Add(_Parameter);
                }
                return(_Parameters);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #3
0
        public async static Task <IEnumerable <SelectListItem> > WebGetNonFleetTxnCode()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", 1);


                var getObjData = await objEngine.ExecuteCommandAsync("WebGetNonFleetTxnCode", CommandType.StoredProcedure, Parameters);


                var list = new List <SelectListItem>();

                while (getObjData.Read())
                {
                    list.Add(new SelectListItem
                    {
                        Text  = Convert.ToString(getObjData["Descp"]),
                        Value = Convert.ToString(getObjData["TxnCd"])
                    });
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #4
0
        public async static Task <IEnumerable <SelectListItem> > WebGetMap()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web);


            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlCommand cmd        = new SqlCommand();
                var        getObjData = await objEngine.ExecuteCommandAsync("WebGetMapId", CommandType.StoredProcedure);


                var list = new List <SelectListItem>();

                while (getObjData.Read())
                {
                    list.Add(new SelectListItem
                    {
                        Text  = Convert.ToString(getObjData["User Id"]),
                        Value = Convert.ToString(getObjData["User Id"])
                    });
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #5
0
        public static async Task <IEnumerable <SelectListItem> > WebGetCycleStmt(string cycNo)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@CycNo", String.IsNullOrEmpty(cycNo) ? (object)DBNull.Value : cycNo);
                var getObjData = await objEngine.ExecuteCommandAsync("WebGetCycleStmt", CommandType.StoredProcedure, Parameters);

                var list = new List <SelectListItem>();
                while (getObjData.Read())
                {
                    list.Add(new SelectListItem {
                        Text = Convert.ToDateTime(getObjData["StmtDate"]).ToString("yyyy-MM-dd"), Value = Convert.ToString(getObjData["CycStmtId"]) + ":" + Convert.ToDateTime(getObjData["StmtDate"]).ToString("yyyy-MM-dd"), Selected = Convert.ToString(getObjData["StmtDate"]) == "1" ? true : false
                    });
                }
                return(list);
            }catch (Exception ex)
            {
                System.Exception expt = new Exception("Error calls SP", ex);
                throw expt;
            }finally
            {
                objEngine.CloseConnection();
            }
        }
        public async Task <List <TmplDisplayer> > WebEventTypeTemplateSelect(string EventTypeId)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = new SqlParameter("@EventTypeId", EventTypeId);
                var execResult = await objEngine.ExecuteCommandAsync("WebEventTypeTemplateSelect", CommandType.StoredProcedure, Parameters);

                var _Parameters = new TmplDisplayer();
                var list        = new List <TmplDisplayer>();
                while (execResult.Read())
                {
                    _Parameters = new TmplDisplayer
                    {
                        ContentTmplt = Convert.ToString(execResult["Template Displayer"]),
                        Descp        = Convert.ToString(execResult["Descp"]),
                        LangInd      = Convert.ToString(execResult["Template Language Indicator"]),
                        Type         = Convert.ToString(execResult["Type"])
                    };
                    list.Add(_Parameters);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #7
0
        public async Task <List <TxnAdjustment> > WebMultiTxnAdjustmentListSelect()
        {
            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("WebMultiTxnAdjustmentListSelect", CommandType.StoredProcedure, Parameters);

                var _List = new List <TxnAdjustment>();
                while (execResult.Read())
                {
                    _List.Add(new TxnAdjustment
                    {
                        BatchId         = Convert.ToString(execResult["Batchid"]),
                        TxnNo           = Convert.ToString(execResult["Txn No"]),
                        ChequeAmt       = ConverterDecimal(execResult["Cheque Amt"]),
                        DisplayTotAmt   = ConverterDecimal(execResult["Total Txn Amt"]),
                        CreationDate    = Convert.ToString(execResult["CreationDate"]),
                        CreatedBy       = Convert.ToString(execResult["User Id"]),
                        SelectedTxnCode = Convert.ToString(execResult["TxnCd"]),
                        SelectedOwner   = Convert.ToString(execResult["Owner"]),
                        SelectedSts     = Convert.ToString(execResult["Sts"]),
                        ChequeNo        = Convert.ToString(execResult["Rrn"])
                    });
                }
                return(_List);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
        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();
            }
        }
Exemple #9
0
        public static async Task <IEnumerable <SelectListItem> > iFrameGetTxnCategory()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                SqlCommand     cmd        = new SqlCommand();
                var            getObjData = await objEngine.ExecuteCommandAsync("iFrameGetTxnCategory", CommandType.StoredProcedure);

                var list = new List <SelectListItem>();

                while (getObjData.Read())
                {
                    list.Add(new SelectListItem
                    {
                        Text  = Convert.ToString(getObjData["Descp"]),
                        Value = Convert.ToString(getObjData["Category"])
                    });
                }
                if (list.Count > 0)
                {
                    list.First().Selected = true;
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #10
0
        public async static Task <IEnumerable <SelectListItem> > WebUserAccessListSelect(string AccessInd = "I")
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[2];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", "1");
                Parameters[1] = String.IsNullOrEmpty(AccessInd) ? new SqlParameter("@AccessInd", DBNull.Value) : new SqlParameter("@AccessInd", AccessInd);

                var getObjData = await objEngine.ExecuteCommandAsync("WebUserAccessListSelect", CommandType.StoredProcedure, Parameters);

                var list = new List <SelectListItem>();
                while (getObjData.Read())
                {
                    list.Add(new SelectListItem
                    {
                        Text  = Convert.ToString(getObjData["UserId"]),
                        Value = Convert.ToString(getObjData["UserId"])
                    });
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #11
0
        public async Task <List <LookupParameters> > WebUndefinedProdType()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                var getObjData = await objEngine.ExecuteCommandAsync("WebUndefinedProdType", CommandType.StoredProcedure, Parameters);

                var list = new List <LookupParameters>();
                while (getObjData.Read())
                {
                    var item = new LookupParameters
                    {
                        ProductCode             = Convert.ToString(getObjData["ProdCd"]),
                        ProductName             = Convert.ToString(getObjData["ProdName"]),
                        Descp                   = Convert.ToString(getObjData["ProdDescp"]),
                        SelectedProductCategory = Convert.ToString(getObjData["ProdCategory"]),
                        SelectedProductType     = Convert.ToString(getObjData["ProdType"]),
                        UnitPrice               = ConverterDecimal(getObjData["ProdUnitPrice"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
        public async Task <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;
            }
        }
Exemple #13
0
        /*
         * public async Task<MsgRetriever> WebNtfEvtConfDelete(string ScheduleId)
         * {
         *  SqlParameter[] Parameters = new SqlParameter[2];
         *  SqlCommand cmd = new SqlCommand();
         *  var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);
         *  try
         *  {
         *      await objDataEngine.InitiateConnectionAsync();
         *      Parameters[0] = new SqlParameter("@ScheduleId", ScheduleId);
         *      Parameters[1] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
         *      Parameters[1].Direction = ParameterDirection.ReturnValue;
         *      var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebNtfEvtConfDelete", CommandType.StoredProcedure, Parameters);
         *      var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
         *      var Descp = await GetMessageCode(Result);
         *      return Descp;
         *  }
         *  finally
         *  {
         *      objDataEngine.CloseConnection();
         *  }
         * }
         *
         */

        //public async Task<MsgRetriever> WebNtfEvtConfRcptDelete(string @SchRcptId)
        //{
        //    SqlParameter[] Parameters = new SqlParameter[2];
        //    SqlCommand cmd = new SqlCommand();
        //    var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);
        //    try
        //    {
        //        await objDataEngine.InitiateConnectionAsync();
        //        Parameters[0] = new SqlParameter("@SchRcptId", @SchRcptId);
        //        Parameters[1] = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
        //        Parameters[1].Direction = ParameterDirection.ReturnValue;
        //        var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebNtfEvtConfRcptDelete", CommandType.StoredProcedure, Parameters);
        //        var Result = Convert.ToInt32(Cmd.Parameters["@RETURN_VALUE"].Value);
        //        var Descp = await GetMessageCode(Result);
        //        return Descp;
        //    }
        //    finally
        //    {
        //        objDataEngine.CloseConnection();
        //    }
        //}
        public async Task <List <LookupParameters> > WebNtfyEventConfSelect(string PlanId)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = new SqlParameter("@EventScheduleId", PlanId);
                var execResult = await objDataEngine.ExecuteCommandAsync("[WebNtfyEventConfSelect]", CommandType.StoredProcedure, Parameters);

                var _Parameters = new List <LookupParameters>();
                while (execResult.Read())
                {
                    var _Parameter = new LookupParameters
                    {
                        BitmapAmt         = Convert.ToString(execResult["ParamInd"]),
                        EvtPlanDetailId   = Convert.ToString(execResult["EventPlanDetailId"]),
                        EventScheduleId   = PlanId,
                        EventTypeId       = Convert.ToString(execResult["EventTypeId"]),
                        EventPlanId       = Convert.ToString(execResult["EventPlanId"]),
                        DetailedDescp     = Convert.ToString(execResult["Descp"]),
                        type              = Convert.ToString(execResult["Type"]),
                        TypeDesc          = Convert.ToString(execResult["TypeDescp"]),
                        SelectedPriority  = Convert.ToString(execResult["Severity"]),
                        SelectedOwner     = Convert.ToString(execResult["OwnerType"]),
                        SelectedStatus    = Convert.ToString(execResult["Sts"]),
                        SelectedRefTo     = Convert.ToString(execResult["Refto"]),
                        RefKey            = Convert.ToString(execResult["Refkey"]),
                        CompanyName       = Convert.ToString(execResult["CmpyName"]),
                        MaxOccur          = Convert.ToString(execResult["MaxOccur"]),
                        SelectedFrequency = Convert.ToString(execResult["OccurPeriodType"]),
                        MinIntVal         = Convert.ToString(execResult["MinIntVal"]),
                        MaxIntVal         = Convert.ToString(execResult["MaxIntVal"]),
                        MinMoneyVal       = ConverterDecimal(execResult["MinMoneyVal"]),
                        MaxMoneyVal       = ConverterDecimal(execResult["MaxMoneyVal"]),
                        MinDateVal        = DateConverter(execResult["MinDateVal"]),
                        MaxDateVal        = DateConverter(execResult["MaxDateVal"]),
                        MinTimeVal        = Convert.ToString(execResult["MinTimeVal"]),
                        MaxTimeVal        = Convert.ToString(execResult["MaxTimeVal"]),
                        VarCharVal        = Convert.ToString(execResult["VarCharVal"]),
                        PeriodType        = Convert.ToString(execResult["PeriodType"]),
                        PeriodInterval    = Convert.ToString(execResult["PeriodInterval"]),
                        ApplyAllInd       = BoolConverter(execResult["AllAppyInd"]),
                        DefaultInd        = BoolConverter(execResult["DefaultInd"]),
                        LastUpdated       = Convert.ToString(execResult["LastUpdDate"]),
                        UpdatedBy         = Convert.ToString(execResult["UserId"]),
                        ParamInd          = Convert.ToString(execResult["ParamInd"]),
                        NotifyInd         = ConvertInt(execResult["EvtTypeChannelInd"])
                    };
                    _Parameters.Add(_Parameter);
                }
                return(_Parameters);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #14
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();
            }
        }
        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();
            }
        }
Exemple #16
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();
            }
        }
Exemple #17
0
        public async Task <List <SelectListItem> > WebGetEvtInd()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                var getObjData = await objEngine.ExecuteCommandAsync("[WebGetEvtInd]", CommandType.StoredProcedure);

                var list = new List <SelectListItem>();
                list.Add(new SelectListItem {
                    Text = "", Value = ""
                });
                while (getObjData.Read())
                {
                    var item = new SelectListItem
                    {
                        Text  = Convert.ToString(getObjData["Descp"]),
                        Value = Convert.ToString(getObjData["RefCd"]),
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #18
0
        public async Task <List <LookupParameters> > WebEventTypeListSelect()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                var getObjData = await objEngine.ExecuteCommandAsync("[WebEventTypeListSelect]", CommandType.StoredProcedure);

                var list = new List <LookupParameters>();
                while (getObjData.Read())
                {
                    var item = new LookupParameters
                    {
                        EventTypeId       = Convert.ToString(getObjData["ID"]),
                        SelectedEventType = Convert.ToString(getObjData["Type"]),
                        ShortDescp        = Convert.ToString(getObjData["Short Description"]),
                        DetailedDescp     = Convert.ToString(getObjData["Detailed Description"]),
                        SelectedStatus    = Convert.ToString(getObjData["Status"]),
                        LastUpdated       = DateConverter(getObjData["Update Date"]),
                        UpdatedBy         = Convert.ToString(getObjData["Update By"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #19
0
        public async Task <List <LookupParameters> > WebEventSelect(string EventId)
        {
            var objEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

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

                while (getObjData.Read())
                {
                    var info = new LookupParameters
                    {
                        Id = Convert.ToString(getObjData["EvtId"]),
                        EventScheduleId   = Convert.ToString(getObjData["EventScheduleId"]),
                        ShortDescp        = Convert.ToString(getObjData["ShortDescp"]),
                        type              = Convert.ToString(getObjData["Type"]),
                        SelectedPriority  = Convert.ToString(getObjData["Severity"]),
                        SelectedOwner     = Convert.ToString(getObjData["OwnerType"]),
                        TypeDesc          = Convert.ToString(getObjData["TypeDescp"]),
                        SelectedRefTo     = Convert.ToString(getObjData["Refto"]),
                        RefKey            = Convert.ToString(getObjData["Refkey"]),
                        CompanyName       = Convert.ToString(getObjData["CmpyName"]),
                        DetailedDescp     = Convert.ToString(getObjData["EvtDescp"]),
                        MaxOccur          = Convert.ToString(getObjData["MaxOccur"]),
                        SelectedFrequency = Convert.ToString(getObjData["OccurPeriodType"]),
                        MinIntVal         = Convert.ToString(getObjData["MinIntVal"]),
                        MaxIntVal         = Convert.ToString(getObjData["MaxIntVal"]),
                        MinMoneyVal       = Convert.ToString(getObjData["MinMoneyVal"]),
                        MaxMoneyVal       = Convert.ToString(getObjData["MaxMoneyVal"]),
                        MinDateVal        = Convert.ToString(getObjData["MinDateVal"]),
                        MaxDateVal        = Convert.ToString(getObjData["MaxDateVal"]),
                        MinTimeVal        = Convert.ToString(getObjData["MinTimeVal"]),
                        MaxTimeVal        = Convert.ToString(getObjData["MaxTimeVal"]),
                        VarCharVal        = Convert.ToString(getObjData["VarCharVal"]),
                        PeriodType        = Convert.ToString(getObjData["PeriodType"]),
                        PeriodInterval    = Convert.ToString(getObjData["PeriodInterval"]),
                        NotifyInd         = ConvertInt(getObjData["ChannelInd"]),
                        LastUpdated       = Convert.ToString(getObjData["LastUpdDate"]),
                        UpdatedBy         = Convert.ToString(getObjData["UserId"]),
                        ParamInd          = Convert.ToString(getObjData["ParamInd"]),
                        SentDate          = DateConverter(getObjData["SentDate"])
                    };

                    String BitmapAmt = Convert.ToString(getObjData["ParamInd"]);
                    info.BitmapAmt = BitmapAmt;
                    list.Add(info);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #20
0
        public async Task <List <LookupParameters> > WebEventTypeSelect(string EventTypeId)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[1];
                Parameters[0] = new SqlParameter("@EventTypeId", EventTypeId);
                var execResult = await objEngine.ExecuteCommandAsync("WebEventTypeSelect", CommandType.StoredProcedure, Parameters);

                var _Parameters = new LookupParameters();
                var list        = new List <LookupParameters>();
                while (execResult.Read())
                {
                    _Parameters = new LookupParameters
                    {
                        EventTypeId       = Convert.ToString(execResult["EvtTypeID"]),
                        EventPlanId       = Convert.ToString(execResult["EvtPlanId"]),
                        ShortDescp        = Convert.ToString(execResult["Short Description"]),
                        TypeDesc          = Convert.ToString(execResult["Short Description"]),
                        SelectedEventType = Convert.ToString(execResult["Type"]),
                        SelectedPriority  = Convert.ToString(execResult["Severity"]),
                        SelectedOwner     = Convert.ToString(execResult["Scope"]),
                        SelectedStatus    = Convert.ToString(execResult["Status"]),
                        ApplyAllInd       = BoolConverter(execResult["ApplyAllInd"]),
                        DetailedDescp     = Convert.ToString(execResult["Full Description"]),
                        BitmapAmt         = Convert.ToString(execResult["BitmapAmt"]),
                        MaxOccur          = Convert.ToString(execResult["Total Occurs"]),
                        SelectedFrequency = Convert.ToString(execResult["Set Frequency Type"]),
                        MinIntVal         = Convert.ToString(execResult["MinIntVal"]),
                        MaxIntVal         = Convert.ToString(execResult["MaxIntVal"]),
                        EvtPlanDetailId   = Convert.ToString(execResult["EvtPlanDetailId"]),
                        MinMoneyVal       = ConverterDecimal(execResult["MinMoneyVal"]),
                        MaxMoneyVal       = ConverterDecimal(execResult["MaxMoneyVal"]),
                        MinDateVal        = DateConverter(execResult["MinDateVal"]),
                        MaxDateVal        = DateConverter(execResult["MaxDateVal"]),
                        MinTimeVal        = Convert.ToString(execResult["MinTimeVal"]),
                        MaxTimeVal        = Convert.ToString(execResult["MaxTimeVal"]),
                        VarCharVal        = Convert.ToString(execResult["VarCharVal"]),
                        PeriodType        = Convert.ToString(execResult["Period Type"]),
                        PeriodInterval    = Convert.ToString(execResult["Period Interval"]),
                        NotifyInd         = ConvertInt(execResult["NtfyInd"]),
                        LastUpdated       = Convert.ToString(execResult["Update On"]),
                        UpdatedBy         = Convert.ToString(execResult["Update by"]),
                        DefaultInd        = BoolConverter(execResult["DefaultInd"])
                    };
                    list.Add(_Parameters);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #21
0
        public async Task <List <ManualSlipEntry> > GetManualSlipEntryTxnList(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 = await objDataEngine.ExecuteCommandAsync("WebMerchManualTxnListSelect", CommandType.StoredProcedure, Parameters);

                var _ManualSlipEntryTxnList = new List <ManualSlipEntry>();

                while (execResult.Read())
                {
                    _ManualSlipEntryTxnList.Add(new ManualSlipEntry
                    {
                        BusnLocation         = Convert.ToString(execResult["Dealer"]),
                        SelectedTermId       = Convert.ToString(execResult["Terminal Id"]),
                        SiteId               = Convert.ToString(execResult["Site Id"]),
                        BatchId              = Convert.ToString(execResult["Batch Id"]),      //
                        InvoiceNo            = ConvertInt(execResult["Invoice No"]),          //
                        RcptNo               = Convert.ToString(execResult["Receipt No"]),    //
                        TxnDate              = DateConverter(execResult["Transaction Date"]), //
                        CardNo               = Convert.ToString(execResult["Card No"]),
                        AuthCardNo           = Convert.ToString(execResult["Driver Card"]),   //
                        DisplayTxnAmt        = ConverterDecimal(execResult["Txn Amount"]),
                        ShownTxnAmt          = ConverterDecimal(execResult["Txn Amount"]),    //
                        Descp                = Convert.ToString(execResult["Description"]),   //
                        AuthNo               = Convert.ToString(execResult["Auth Resp"]),     //
                        Odometer             = ConvertInt(execResult["Odometer Reading"]),
                        ArrayCnt             = ConvertInt(execResult["Array Count"]),
                        SelectedTxnCd        = ConvertInt(execResult["TxnCd"]),
                        TxnId                = Convert.ToString(execResult["TxnId"]),
                        SelectedSts          = Convert.ToString(execResult["Sts"]),
                        VATNo                = Convert.ToString(execResult["VATNo"]),
                        VATAmt               = ConverterDecimal(execResult["VATAmt"]),
                        _CreationDatenUserId = new CreationDatenUserId
                        {
                            CreationDate = DateConverter(execResult["Creation Date"]),
                            UserId       = Convert.ToString(execResult["User Id"])
                        },
                    });
                }
                ;
                return(_ManualSlipEntryTxnList);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #22
0
        public async Task <List <MerchPostedTxnSearch> > WebMerchTxnSearch(TxnSearchModel _model)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);


            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[7];
                Parameters[0] = new SqlParameter("@AcqNo", this.GetAcqNo);
                Parameters[1] = String.IsNullOrEmpty(_model.BusnLocation) ? new SqlParameter("@BusnLocation", DBNull.Value) : new SqlParameter("@BusnLocation", _model.BusnLocation);
                Parameters[2] = String.IsNullOrEmpty(_model.SelectedMerchTxnCd) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _model.SelectedMerchTxnCd);
                Parameters[3] = String.IsNullOrEmpty(_model.MerchAcctNo) ? new SqlParameter("@MerchAcctNo", DBNull.Value) : new SqlParameter("@MerchAcctNo", _model.MerchAcctNo);
                Parameters[4] = String.IsNullOrEmpty(_model.MerchFromDate) ? new SqlParameter("@FrmTxnDate", DBNull.Value) : new SqlParameter("@FrmTxnDate", DateConverterDB(_model.MerchFromDate));
                Parameters[5] = String.IsNullOrEmpty(_model.MerchToDate) ? new SqlParameter("@ToTxnDate", DBNull.Value) : new SqlParameter("@ToTxnDate", DateConverterDB(_model.MerchToDate));
                Parameters[6] = String.IsNullOrEmpty(_model.SelectedTxnCategory) ? new SqlParameter("@TxnCat", DBNull.Value) : new SqlParameter("@TxnCat", _model.SelectedTxnCategory);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebMerchTxnSearch", CommandType.StoredProcedure, Parameters);

                var _MerchPostedTxnSearch = new List <MerchPostedTxnSearch>();
                while (execResult.Read())
                {
                    _MerchPostedTxnSearch.Add(new MerchPostedTxnSearch
                    {
                        SelectedDealer = Convert.ToString(execResult["Dealer"]),
                        TermBatch      = Convert.ToString(execResult["TermBatch"]),
                        TxnDate        = Convert.ToString(execResult["TxnDate"]),
                        cardNo         = Convert.ToString(execResult["CardNo"]),
                        TxnDesp        = Convert.ToString(execResult["TxnDescp"]),
                        TxnAmt         = ConverterDecimal(execResult["BillingAmt"]),
                        TermId         = Convert.ToString(execResult["TermId"]),
                        AuthNo         = Convert.ToString(execResult["AuthNo"]),
                        AuthCardNo     = Convert.ToString(execResult["AuthCardNo"]),
                        PrcsDate       = Convert.ToString(execResult["PrcsDate"]),
                        TxnId          = Convert.ToString(execResult["TxnId"]),
                        ProductQty     = Convert.ToString(execResult["ProductQty"]),
                        ProductAmt     = ConverterDecimal(execResult["ProductAmt"]),
                        VATAmt         = ConverterDecimal(execResult["VAT Amt"]),
                        BaseAmt        = ConverterDecimal(execResult["Base Amt"]),
                        VATCd          = Convert.ToString(execResult["VATCd"]),
                        VATRate        = ConverterDecimal(execResult["VATRate"]),
                        ProductDescp   = Convert.ToString(execResult["ProductDescp"])
                    });
                }
                ;
                return(_MerchPostedTxnSearch);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #23
0
        public async Task <List <TxnAdjustment> > GetTxnAdjustmentList(string AcctNo)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

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

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

                var _TxnAdjustmentList = new List <TxnAdjustment>();
                var _TxnAdjustmentInfo = new List <TxnAdjustment>();

                while (execResult.Read())
                {
                    _TxnAdjustmentList.Add(new TxnAdjustment
                    {
                        RefType            = Convert.ToString(execResult["Txn Type"]),
                        TxnDate            = DateConverter(execResult["Txn Date"]),
                        TotAmnt            = ConverterDecimal(execResult["Txn Amount"]),
                        DisplayTotAmt      = ConverterDecimal(execResult["Txn Amount"]),
                        BillingTxnAmt      = ConverterDecimal(execResult["Billing Amount"]),
                        Descp              = Convert.ToString(execResult["Txn Description"]),
                        StsDescp           = Convert.ToString(execResult["Status"]),
                        SelectedSts        = Convert.ToString(execResult["Sts"]),
                        UserId             = Convert.ToString(execResult["User Id"]),    //R
                        SelectedTxnCd      = Convert.ToString(execResult["TxnCd"]),
                        TxnId              = Convert.ToString(execResult["Txn Id"]),     //R
                        WithHeldUnsettleId = ConvertInt(execResult["WU Id"]),            //R
                        CreationDate       = DateConverter(execResult["Creation Date"]), //R
                        AppvRemarks        = Convert.ToString(execResult["AppvRemarks"]),
                        _CardnAccNo        = new CardnAccNo
                        {
                            AccNo  = Convert.ToString(execResult["Account No"]),
                            CardNo = Convert.ToString(execResult["Card No"])
                        }
                    });
                }
                ;
                return(_TxnAdjustmentList);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
        public async Task <TxnAdjustment> WebMerchantMultiTxnAdjustmentSelect(string InvoiceNo, string BatchId)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

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

                var _Adj    = new TxnAdjustment();
                var txnList = new List <MultipleTxnRecord>();
                while (execResult.Read())
                {
                    _Adj.SelectedTxnCd   = Convert.ToString(execResult["TxnCd"]);
                    _Adj.SelectedTxnType = Convert.ToString(execResult["Txn Type"]);
                    _Adj.TxnDate         = DateConverter(execResult["TxnDate"]);
                    _Adj.ChequeAmt       = ConverterDecimal(execResult["Cheque Amt"]);
                    _Adj.SelectedOwner   = Convert.ToString(execResult["Owner"]);
                    _Adj.SelectedSts     = Convert.ToString(execResult["Sts"]);
                    _Adj.GroupingBatchId = Convert.ToString(execResult["Grouping BatchId"]);
                    _Adj.BatchId         = Convert.ToString(execResult["BatchId"]);
                    _Adj.InvoiceNo       = Convert.ToString(execResult["Invoice No"]);
                    _Adj.SelectedSts     = Convert.ToString(execResult["Approval Status"]);
                    _Adj.StsDescp        = Convert.ToString(execResult["Approval Desc"]);
                    txnList.Add(new MultipleTxnRecord
                    {
                        TxnAmt         = ConverterDecimal(execResult["Amt"]),
                        MerchantAcctNo = Convert.ToString(execResult["Merchant No"]),
                        AcctName       = Convert.ToString(execResult["Merchant Name"]),
                        TxnId          = Convert.ToString(execResult["Ids"]),
                        Descp          = Convert.ToString(execResult["Description"])
                    });
                }
                if (txnList.Any())
                {
                    _Adj.MultipleTxnRecord = txnList;
                }
                return(_Adj);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #25
0
        public async static Task <MsgRetriever> GetMessageCode(int msgCd)
        {
            FleetDataEngine Engine = new FleetDataEngine(AccessMode.Admin, DBType.Maint);

            try
            {
                await Engine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[2];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@MsgCd", msgCd);
                Parameters[1] = new SqlParameter("@LangId", "EN");
                var Reader = await Engine.ExecuteCommandAsync("WebGetMsg", CommandType.StoredProcedure, Parameters);

                while (Reader.Read())
                {
                    if (msgCd < 54999)
                    {
                        var tempData = new MsgRetriever
                        {
                            flag = Convert.ToInt32(Reader["Flag"]),
                            desp = Convert.ToString(Reader["Descp"])
                        };
                        return(tempData);
                    }
                    else
                    {
                        var tempData = new MsgRetriever
                        {
                            flag = Convert.ToInt32(Reader["Flag"]),
                            desp = Convert.ToString(Reader["Descp"])
                        };
                        return(tempData);
                    }
                }

                return(new MsgRetriever
                {
                    flag = 1,
                    desp = "***"
                });
            }
            finally
            {
                Engine.CloseConnection();
            }
        }
Exemple #26
0
        public async Task <TxnAdjustment> GetTxnAdjustmentDetail(TxnAdjustment _TxnAdjustment)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[2];
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = String.IsNullOrEmpty(_TxnAdjustment.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _TxnAdjustment.TxnId);

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

                var _GetTxnAdjustmentDetail = new TxnAdjustment();
                _GetTxnAdjustmentDetail._CardnAccNo = new CardnAccNo();
                while (execResult.Read())
                {
                    _GetTxnAdjustmentDetail.TxnId              = Convert.ToString(execResult["TxnId"]);
                    _GetTxnAdjustmentDetail.TxnDate            = DateConverter(execResult["TxnDate"]);
                    _GetTxnAdjustmentDetail.DueDate            = DateConverter(execResult["DueDate"]);
                    _GetTxnAdjustmentDetail.SelectedTxnCd      = Convert.ToString(execResult["TxnCd"]);
                    _GetTxnAdjustmentDetail._CardnAccNo.CardNo = Convert.ToString(execResult["CardNo"]);
                    _GetTxnAdjustmentDetail.TotAmnt            = ConverterDecimal(execResult["TxnAmt"]);
                    _GetTxnAdjustmentDetail.Totpts             = ConverterDecimal(execResult["Pts"]);
                    _GetTxnAdjustmentDetail.Descp              = Convert.ToString(execResult["Descp"]);
                    _GetTxnAdjustmentDetail.AppvCd             = Convert.ToString(execResult["AppvCd"]);
                    _GetTxnAdjustmentDetail.SelectedSts        = Convert.ToString(execResult["Sts"]);
                    _GetTxnAdjustmentDetail.UserId             = Convert.ToString(execResult["UserId"]);
                    _GetTxnAdjustmentDetail.WithHeldUnsettleId = ConvertInt(execResult["WithheldUnsettleId"]);
                    _GetTxnAdjustmentDetail.CreationDate       = DateConverter(execResult["CreationDate"]);
                    _GetTxnAdjustmentDetail.SelectedOwner      = Convert.ToString(execResult["Owner"]);
                }
                ;

                //if (string.IsNullOrEmpty(_GetTxnAdjustmentDetail.SelectedSts))
                //{
                //    _GetTxnAdjustmentDetail.SelectedSts = "H";
                //}
                return(_GetTxnAdjustmentDetail);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
Exemple #27
0
        public async Task <LookupParameters> WebRefSelect(string RefType, string RefCd, string RefNo, string RefId)
        {
            var objEngine       = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);
            var _globalVariable = new LookupParameters();

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[5];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", 1);
                Parameters[1] = String.IsNullOrEmpty(RefNo) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", RefNo);
                Parameters[2] = String.IsNullOrEmpty(RefId) ? new SqlParameter("@RefId", DBNull.Value) : new SqlParameter("@RefId", RefNo);
                Parameters[3] = String.IsNullOrEmpty(RefType) ? new SqlParameter("@RefType", DBNull.Value) : new SqlParameter("@RefType", RefType);
                Parameters[4] = String.IsNullOrEmpty(RefCd) ? new SqlParameter("@RefCd", DBNull.Value) : new SqlParameter("@RefCd", RefCd);
                var getObjData = await objEngine.ExecuteCommandAsync("WebRefSelect", CommandType.StoredProcedure, Parameters);

                while (getObjData.Read())
                {
                    if (RefType == "State")
                    {
                        _globalVariable.Country   = Convert.ToString(getObjData["CtryCd"]);
                        _globalVariable.StateCode = Convert.ToString(getObjData["StateCd"]);
                        _globalVariable.StateName = Convert.ToString(getObjData["Descp"]);
                    }
                    else if (RefType == "City")
                    {
                        _globalVariable.ParameterCode = Convert.ToString(getObjData["ParamCd"]);
                        _globalVariable.Country       = Convert.ToString(getObjData["RefNo"]);
                        _globalVariable.StateCode     = Convert.ToString(getObjData["RefId"]);
                        _globalVariable.CityName      = Convert.ToString(getObjData["Descp"]);
                    }
                    else
                    {
                        _globalVariable.ParameterCode  = Convert.ToString(getObjData["ParamCd"]);
                        _globalVariable.ParameterDescp = Convert.ToString(getObjData["Descp"]);
                    }
                }
                return(_globalVariable);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #28
0
        public async Task <List <LookupParameters> > WebRefListSelect(string refType)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[2];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = new SqlParameter("@RefType", String.IsNullOrEmpty(refType) ? (object)DBNull.Value : refType);
                var getObjData = await objEngine.ExecuteCommandAsync("WebRefListSelect", CommandType.StoredProcedure, Parameters);

                var list = new List <LookupParameters>();
                while (getObjData.Read())
                {
                    var item = new LookupParameters();
                    if (refType.ToLower() == "state")
                    {
                        item.Country       = Convert.ToString(getObjData["Country"]);
                        item.ParameterCode = Convert.ToString(getObjData["CtryCd"]);
                        item.StateName     = Convert.ToString(getObjData["StateName"]);
                        item.StateCode     = Convert.ToString(getObjData["StateCd"]);
                    }
                    else if (refType.ToLower() == "city")
                    {
                        item.Country       = Convert.ToString(getObjData["Country"]);
                        item.StateName     = Convert.ToString(getObjData["State"]);
                        item.ParameterCode = Convert.ToString(getObjData["ParamCd"]);
                        item.CityName      = Convert.ToString(getObjData["City"]);
                    }
                    else
                    {
                        item.ParameterDescp = Convert.ToString(getObjData["Descp"]);
                        item.ParameterCode  = Convert.ToString(getObjData["ParamCd"]);
                    }
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #29
0
        public async static Task <IEnumerable <SelectListItem> > WebGetRefLib(string refType, string RefNo = null, string RefInd = null, string RefId = null, bool PrependNull = true)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[5];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", 1);
                Parameters[1] = new SqlParameter("@RefType", String.IsNullOrEmpty(refType) ? (object)DBNull.Value : refType);
                Parameters[2] = String.IsNullOrEmpty(RefNo) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", RefNo);
                Parameters[3] = String.IsNullOrEmpty(RefInd) ? new SqlParameter("@RefInd", DBNull.Value) : new SqlParameter("@RefInd", RefInd);
                Parameters[4] = String.IsNullOrEmpty(RefId) ? new SqlParameter("@RefId", DBNull.Value) : new SqlParameter("@RefId", RefId);
                var getObjData = await objEngine.ExecuteCommandAsync("WebGetRefLib", CommandType.StoredProcedure, Parameters);

                var list = new List <SelectListItem>();
                if (PrependNull)
                {
                    list.Add(new SelectListItem {
                        Text = "", Value = ""
                    });
                }
                while (getObjData.Read())
                {
                    list.Add(new SelectListItem
                    {
                        Text     = Convert.ToString(getObjData["Descp"]),
                        Value    = Convert.ToString(getObjData["RefCd"]),
                        Selected = Convert.ToString(getObjData["RefCd"]) == "1" ? true : false
                    });
                }

                if (list.Count > 0)
                {
                    list.First().Selected = true;
                }

                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
Exemple #30
0
        /*
         * public async Task<AcctSOA> WebAcctSOASummSelect(AcctSOA _AcctSOA)
         * {
         *  var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);
         *  try
         *  {
         *      await objDataEngine.InitiateConnectionAsync();
         *      SqlParameter[] Parameters = new SqlParameter[1];
         *      Parameters[0] = String.IsNullOrEmpty(_AcctSOA.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _AcctSOA.AcctNo);
         *
         *      var Reader = await objDataEngine.ExecuteCommandAsync("WebAcctSOASummSelect", CommandType.StoredProcedure, Parameters);
         *
         *      while (Reader.Read())
         *      {
         *
         *          var _AcctSOASelect = new AcctSOA
         *          {
         *              CompanyID = Convert.ToString(Reader["Company Id"]),
         *              CompanyName = Convert.ToString(Reader["Company Name"]),
         *              BasicCard = Convert.ToString(Reader["Basic Card"]),
         *              SelectedStmtDate = Convert.ToString(Reader["Cycle Date"]),
         *              LastAgeCd = Convert.ToString(Reader["Last Age Code"]),
         *              CreditLimit = ConverterDecimal(Reader["Credit Limit"]),
         *              OpeningBal = ConverterDecimal(Reader["Opening Balance"]),
         *              MTDDebits = ConverterDecimal(Reader["MTD Debits"]),
         *              AvaiCredLimits = ConverterDecimal(Reader["Available Credit Limit"]),
         *              CurrBalance = ConverterDecimal(Reader["Current Balance"]),
         *              MTDCreds = ConverterDecimal(Reader["MTD Credits"]),
         *              TotMinimumPymt = Convert.ToString(Reader["Total Minimun Payment"]),
         *              CrrtDueMinimumOymt = ConverterDecimal(Reader["Current Due Minimun Payment"]),
         *              PastDueMinimumPymt = Convert.ToString(Reader["Past Due Minimun Payment"]),
         *              PymtDueDate = Convert.ToString(Reader["Payment DueDate"]),
         *              LastPymtDate = Convert.ToString(Reader["Last Payment Date"]),
         *              LastPymtAmt = ConverterDecimal(Reader["Last Payment Amount"])
         *          };
         *          return _AcctSOASelect;
         *      }
         *      return new AcctSOA();
         *  }
         *  finally
         *  {
         *      objDataEngine.CloseConnection();
         *
         *  }
         * }
         */
        /*
         * public async Task<List<AcctSOA>> WebAcctSOASummList(AcctSOA _AcctSOA)
         * {
         *  var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);
         *
         *  try
         *  {
         *      objDataEngine.InitiateConnection();
         *      SqlParameter[] Parameters = new SqlParameter[1];
         *      Parameters[0] = String.IsNullOrEmpty(_AcctSOA.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _AcctSOA.AcctNo);
         *
         *      var execResult = await objDataEngine.ExecuteCommandAsync("WebAcctSOASummList", CommandType.StoredProcedure, Parameters);
         *
         *      var _SOAList = new List<AcctSOA>();
         *      while (execResult.Read())
         *      {
         *
         *          _SOAList.Add(new AcctSOA
         *          {
         *              Month = Convert.ToString(execResult["Mth"]),
         *              SelectedStmtDate = Convert.ToString(execResult["Statement Date"]),
         *              ClseBalance = Convert.ToString(execResult["Closing Balance"]),
         *              MinimumPayment = Convert.ToString(execResult["Minimun Payment"]),
         *              Debits = Convert.ToString(execResult["Debits"]),
         *              Credits = Convert.ToString(execResult["Credits"]),
         *              Sales = Convert.ToString(execResult["Sales"]),
         *              DBAdjust = Convert.ToString(execResult["DB adjustment"]),
         *              Charges = Convert.ToString(execResult["Charges"]),
         *              Payment = Convert.ToString(execResult["Payment"]),
         *              CRAdjust = Convert.ToString(execResult["CR Adjustment"]),
         *              age = Convert.ToString(execResult["Age"]),
         *              Rchq = Convert.ToString(execResult["RChq"]),
         *              Lpay = Convert.ToString(execResult["Lpay"]),
         *              Rv = Convert.ToString(execResult["Rv"]),
         *              Dun = Convert.ToString(execResult["Dun"])
         *          });
         *      };
         *      return _SOAList;
         *  }
         *  finally
         *  {
         *      objDataEngine.CloseConnection();
         *  }
         *
         *
         * }
         */
        /*
         * public async Task<List<AcctSOA>> WebAcctSOATxnCategoryList(AcctSOA _AcctSOA)
         * {
         *  var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);
         *
         *  try
         *  {
         *      objDataEngine.InitiateConnection();
         *      SqlParameter[] Parameters = new SqlParameter[2];
         *      Parameters[0] = String.IsNullOrEmpty(_AcctSOA.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _AcctSOA.AcctNo);
         *      Parameters[1] = String.IsNullOrEmpty(_AcctSOA.SelectedStmtDate) ? new SqlParameter("@StmtDate", DBNull.Value) : new SqlParameter("@StmtDate", _AcctSOA.SelectedStmtDate);
         *
         *      var execResult = await objDataEngine.ExecuteCommandAsync("WebAcctSOATxnCategoryList", CommandType.StoredProcedure, Parameters);
         *
         *      var _SOATxnCategoryList = new List<AcctSOA>();
         *      while (execResult.Read())
         *      {
         *
         *          _SOATxnCategoryList.Add(new AcctSOA
         *          {
         *              TxnCode = Convert.ToString(execResult["Transaction Code"]),
         *              TxnEventCd = Convert.ToString(execResult["Transaction Event Code"]),
         *              TxnDesc = Convert.ToString(execResult["Transaction Desc"]),
         *              TotalCount = Convert.ToString(execResult["Total Count"]),
         *              TotalAmt = ConverterDecimal(execResult["Total Amount"]),
         *              TotalItemQty =Convert.ToString(execResult["Total Item Quantity"]),
         *              TotalItemAmt = ConverterDecimal(execResult["Total Item Amount"]),
         *              SelectedStmtDate = Convert.ToString(execResult["Statement Date"]),
         *              CompanyName = Convert.ToString(execResult["Company Name"]),
         *              AcctNo = Convert.ToString(execResult["Account No"]),
         *          });
         *      };
         *      return _SOATxnCategoryList;
         *  }
         *  finally
         *  {
         *      objDataEngine.CloseConnection();
         *  }
         * }
         */
        public async Task <List <AcctSOA> > WebAcctSOATxnList(AcctSOA _AcctSOA)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                objDataEngine.InitiateConnection();
                SqlParameter[] Parameters = new SqlParameter[3];
                Parameters[0] = String.IsNullOrEmpty(_AcctSOA.AcctNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _AcctSOA.AcctNo);
                Parameters[1] = String.IsNullOrEmpty(_AcctSOA.SelectedStmtDate) ? new SqlParameter("@StmtDate", DBNull.Value) : new SqlParameter("@StmtDate", _AcctSOA.SelectedStmtDate);
                Parameters[2] = String.IsNullOrEmpty(_AcctSOA.TxnCode) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _AcctSOA.TxnCode);

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

                var _SOATxnList = new List <AcctSOA>();
                while (execResult.Read())
                {
                    _SOATxnList.Add(new AcctSOA
                    {
                        //CompanyName = Convert.ToString(execResult["Company Name"]),
                        CardHolderNo = Convert.ToString(execResult["CardHolder No"]),
                        DriverCardNo = Convert.ToString(execResult["Driver Card No"]),
                        TxnDate      = Convert.ToString(execResult["Transaction Date"]),
                        txnTime      = Convert.ToString(execResult["Transaction Time"]),
                        PostDate     = Convert.ToString(execResult["Post Date"]),
                        TxnCode      = Convert.ToString(execResult["Txn Code"]),
                        Curr         = Convert.ToString(execResult["Curr"]),
                        TxnAmt       = ConverterDecimal(execResult["Transaction Amount"]),
                        Amt          = ConverterDecimal(execResult["Amount"]),
                        ChqRefNo     = Convert.ToString(execResult["Chq Ref No"]),
                        MerchantID   = Convert.ToString(execResult["Merchant ID"]),
                        MerchantName = Convert.ToString(execResult["Merchant Name"]),
                        DBAName      = Convert.ToString(execResult["Trading Name Description"]),
                        MCC          = Convert.ToString(execResult["Mcc"]),
                        RRn          = Convert.ToString(execResult["RRN"]),
                    });
                }
                ;
                return(_SOATxnList);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }