示例#1
0
        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();
            }
        }
示例#2
0
        public async Task <MsgRetriever> DelTxnAdjustment(TxnAdjustment _TxnAdjustment)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[5];
                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(_TxnAdjustment.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _TxnAdjustment.TxnId);
                Parameters[2]           = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _TxnAdjustment._CardnAccNo.AccNo);
                Parameters[3]           = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _TxnAdjustment._CardnAccNo.CardNo);
                Parameters[4]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[4].Direction = ParameterDirection.ReturnValue;
                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebTxnAdjustmentDelete", CommandType.StoredProcedure, Parameters);

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

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#3
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();
            }
        }
示例#4
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();
            }
        }
示例#5
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();
            }
        }
示例#6
0
        public async Task <MsgRetriever> ResetInternalUserPassword(string Token, Login Login)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Web);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[3];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0]           = String.IsNullOrEmpty(Token) ? new SqlParameter("@Token", DBNull.Value) : new SqlParameter("@Token", Token);
                Parameters[1]           = String.IsNullOrEmpty(Login.Password) ? new SqlParameter("@NewPass", DBNull.Value) : new SqlParameter("@NewPass", Login.Password);
                Parameters[2]           = new SqlParameter("@RETURN_VALUE", SqlDbType.TinyInt);
                Parameters[2].Direction = ParameterDirection.ReturnValue;
                // Parameters[10] = new SqlParameter("@Flag", isUpdate ? "U" : "N");

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

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

                var Descp = await GetMessageCode(Result);

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#7
0
        public async Task <MsgRetriever> SaveMilestoneMerchant(Milestone _milestone)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[12];
                Parameters[0]            = new SqlParameter("@Id", ConvertLongToDb(_milestone.ID));
                Parameters[1]            = String.IsNullOrEmpty(_milestone.SelectedTaskNo) ? new SqlParameter("@TaskNo", DBNull.Value) : new SqlParameter("@TaskNo", _milestone.SelectedTaskNo);//new SqlParameter("@TaskNo", ConvertIntToDb(_milestone.SelectedTaskNo));
                Parameters[2]            = new SqlParameter("@RefKey", ConvertLongToDb(_milestone.aprId));
                Parameters[3]            = String.IsNullOrEmpty(_milestone.RefNo) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", _milestone.RefNo);
                Parameters[4]            = String.IsNullOrEmpty(_milestone.selectedOwner) ? new SqlParameter("@Owner", DBNull.Value) : new SqlParameter("@Owner", _milestone.selectedOwner);
                Parameters[5]            = String.IsNullOrEmpty(_milestone.selectedPriority) ? new SqlParameter("@Priority", DBNull.Value) : new SqlParameter("@Priority", _milestone.selectedPriority); //new SqlParameter("@Priority", ConvertIntToDb(_milestone.selectedPriority));
                Parameters[6]            = String.IsNullOrEmpty(_milestone.Remarks) ? new SqlParameter("@Remarks", DBNull.Value) : new SqlParameter("@Remarks", _milestone.Remarks);
                Parameters[7]            = String.IsNullOrEmpty(_milestone.selectedReasonCd) ? new SqlParameter("@ReasonCd", DBNull.Value) : new SqlParameter("@ReasonCd", _milestone.selectedReasonCd);
                Parameters[8]            = new SqlParameter("@RecallDate", ConvertDatetimeDB(_milestone.RecallDate));
                Parameters[9]            = String.IsNullOrEmpty(_milestone.selectedStatus) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _milestone.selectedStatus);
                Parameters[10]           = String.IsNullOrEmpty(this.GetUserId) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", this.GetUserId);
                Parameters[11]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[11].Direction = ParameterDirection.ReturnValue;

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

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

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#8
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();
            }
        }
示例#9
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();
            }
        }
示例#10
0
        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();
            }
        }
示例#11
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();
            }
        }
示例#12
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();
            }
        }
示例#13
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();
            }
        }
示例#14
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();
            }
        }
示例#15
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();
            }
        }
示例#16
0
        public async Task <MsgRetriever> WebRefMaint(LookupParameters _variable)
        { //@RefCd  to save address is the selected address type
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[8];
                Parameters[0]           = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1]           = String.IsNullOrEmpty(_variable.type) ? new SqlParameter("@RefType", DBNull.Value) : new SqlParameter("@RefType", _variable.type);
                Parameters[2]           = new SqlParameter("@Flag", _variable.flag);
                Parameters[3]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[3].Direction = ParameterDirection.ReturnValue;
                if (_variable.type == "State")
                {
                    //@Html.CustomNgSelectListFor(model => model.Country, Model.Countries, new { required = true }, new { @Name = "Countries", @section = "con", ng_disabled = "isUpdate", on_select = "CountryChanged($item, $model);" })
                    //@Html.CustomNgTextBoxFor(model => model.StateCode, new { required = true }, new { @section = "con", @ng_disabled = "editMode" })
                    //@Html.CustomNgTextBoxFor(model => model.StateName, new { required = true }, new { @section = "con" })

                    Parameters[4] = String.IsNullOrEmpty(_variable.StateCode) ? new SqlParameter("@RefCd", DBNull.Value) : new SqlParameter("@RefCd", _variable.StateCode);
                    Parameters[5] = String.IsNullOrEmpty(_variable.Country) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", _variable.Country);
                    Parameters[6] = String.IsNullOrEmpty(_variable.StateName) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _variable.StateName);
                    Parameters[7] = new SqlParameter("@RefId", DBNull.Value);
                }
                else if (_variable.type == "City")
                {
                    Parameters[4] = String.IsNullOrEmpty(_variable.ParameterCode) ? new SqlParameter("@RefCd", DBNull.Value) : new SqlParameter("@RefCd", _variable.ParameterCode);
                    Parameters[5] = String.IsNullOrEmpty(_variable.Country) ? new SqlParameter("@RefNo", DBNull.Value) : new SqlParameter("@RefNo", _variable.Country);
                    Parameters[6] = String.IsNullOrEmpty(_variable.StateCode) ? new SqlParameter("@RefId", DBNull.Value) : new SqlParameter("@RefId", _variable.StateCode);
                    Parameters[7] = String.IsNullOrEmpty(_variable.CityName) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _variable.CityName);
                    //@Html.CustomNgSelectListFor(model => model.Country, Model.Countries, new { required = true }, new { @Name = "Countries", @section = "con", ng_disabled = "isUpdate", on_select = "CountryChanged($item, $model);" })
                    //@Html.CustomNgSelectListFor(model => model.StateCode, Model.States, new { required = true }, new { @Name = "States", @section = "con", ng_disabled = "isUpdate" })
                    //@Html.CustomNgTextBoxFor(model => model.ParameterCode, new { required = true }, new { @section = "con", @ng_disabled = "editMode" })
                    //@Html.CustomNgTextBoxFor(model => model.CityName, new { required = true }, new { @section = "con" })
                }
                else
                {
                    Parameters[4] = String.IsNullOrEmpty(_variable.ParameterCode) ? new SqlParameter("@RefCd", DBNull.Value) : new SqlParameter("@RefCd", _variable.ParameterCode);
                    Parameters[5] = String.IsNullOrEmpty(_variable.ParameterDescp) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _variable.ParameterDescp);
                    Parameters[6] = new SqlParameter("@RefNo", DBNull.Value);
                    Parameters[7] = new SqlParameter("@RefId", DBNull.Value);
                }
                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("WebRefMaint", CommandType.StoredProcedure, Parameters);

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

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#17
0
        public async Task <MsgRetriever> SaveTxnAdjustment(TxnAdjustment _TxnAdjustment)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CustomerService, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[19];

                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = String.IsNullOrEmpty(_TxnAdjustment.TxnId) ? new SqlParameter("@TxnId", DBNull.Value) : new SqlParameter("@TxnId", _TxnAdjustment.TxnId);
                Parameters[2] = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.AccNo) ? new SqlParameter("@AcctNo", DBNull.Value) : new SqlParameter("@AcctNo", _TxnAdjustment._CardnAccNo.AccNo);
                Parameters[3] = String.IsNullOrEmpty(_TxnAdjustment._CardnAccNo.CardNo) ? new SqlParameter("@CardNo", DBNull.Value) : new SqlParameter("@CardNo", _TxnAdjustment._CardnAccNo.CardNo);
                Parameters[4] = String.IsNullOrEmpty(_TxnAdjustment.SelectedTxnCd) ? new SqlParameter("@TxnCd", DBNull.Value) : new SqlParameter("@TxnCd", _TxnAdjustment.SelectedTxnCd);

                Parameters[5]  = new SqlParameter("@TxnDate", ConvertDatetimeDB(_TxnAdjustment.TxnDate));
                Parameters[6]  = String.IsNullOrEmpty(_TxnAdjustment.DueDate) ? new SqlParameter("@DueDate", DBNull.Value) : new SqlParameter("@DueDate", ConvertDatetimeDB(_TxnAdjustment.DueDate));
                Parameters[7]  = new SqlParameter("@TxnAmt", ConvertDecimalToDb(_TxnAdjustment.TotAmnt));
                Parameters[8]  = new SqlParameter("@Pts", ConvertDecimalToDb(_TxnAdjustment.Totpts));
                Parameters[9]  = String.IsNullOrEmpty(_TxnAdjustment.Descp) ? new SqlParameter("@Descp", DBNull.Value) : new SqlParameter("@Descp", _TxnAdjustment.Descp);
                Parameters[10] = String.IsNullOrEmpty(_TxnAdjustment.AppvCd) ? new SqlParameter("@AppvCd", DBNull.Value) : new SqlParameter("@AppvCd", _TxnAdjustment.AppvCd);
                Parameters[11] = new SqlParameter("@CheqNo", ConvertLongToDb(_TxnAdjustment.ChequeNo));
                Parameters[12] = String.IsNullOrEmpty(_TxnAdjustment.SelectedSts) ? new SqlParameter("@Sts", DBNull.Value) : new SqlParameter("@Sts", _TxnAdjustment.SelectedSts);

                Parameters[13]           = new SqlParameter("@RcptNo", SqlDbType.BigInt);
                Parameters[13].Direction = ParameterDirection.Output;
                Parameters[14]           = new SqlParameter("@RetCd", SqlDbType.BigInt);
                Parameters[14].Direction = ParameterDirection.Output;
                Parameters[15]           = String.IsNullOrEmpty(System.Web.HttpContext.Current.User.Identity.Name) ? new SqlParameter("@UserId", DBNull.Value) : new SqlParameter("@UserId", System.Web.HttpContext.Current.User.Identity.Name);

                Parameters[16]           = String.IsNullOrEmpty(_TxnAdjustment.SelectedOwner) ? new SqlParameter("@Owner", DBNull.Value) : new SqlParameter("@Owner", _TxnAdjustment.SelectedOwner);
                Parameters[17]           = String.IsNullOrEmpty(_TxnAdjustment.DeftBusnLocation) ? new SqlParameter("@Dealer", DBNull.Value) : new SqlParameter("@Dealer", _TxnAdjustment.DeftBusnLocation);
                Parameters[18]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[18].Direction = ParameterDirection.ReturnValue;

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

                var Result = ConvertInt(Cmd.Parameters["@RETURN_VALUE"].Value);
                this.RcptNo = ConvertInt(Cmd.Parameters[13].Value);
                this.RetCd  = ConvertInt(Cmd.Parameters[14].Value);
                var Descp = await GetMessageCode(Result);

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#18
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();
            }
        }
示例#19
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();
            }
        }
示例#20
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();
            }
        }
示例#21
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();
            }
        }
示例#22
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();
            }
        }
示例#23
0
        public async Task <List <LookupParameters> > WebNtfyEventSearch(LookupParameters _Params)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);
            var list      = new List <LookupParameters>();

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[6];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@EvtInd", string.IsNullOrEmpty(_Params.SeletedEventInd) ? (object)DBNull.Value : _Params.SeletedEventInd);
                Parameters[1] = String.IsNullOrEmpty(_Params.SelectedRefTo) ? new SqlParameter("@RefTo", DBNull.Value) : new SqlParameter("@RefTo", _Params.SelectedRefTo);
                Parameters[2] = String.IsNullOrEmpty(_Params.RefKey) ? new SqlParameter("@RefKey", DBNull.Value) : new SqlParameter("@RefKey", _Params.RefKey);
                Parameters[3] = String.IsNullOrEmpty(_Params.SelectedEventType) ? new SqlParameter("@EvtType", DBNull.Value) : new SqlParameter("@EvtType", _Params.SelectedEventType);
                Parameters[4] = String.IsNullOrEmpty(_Params.StartDate) ? new SqlParameter("@StartDate", DBNull.Value) : new SqlParameter("@StartDate", ConvertDatetimeDB(_Params.StartDate));
                Parameters[5] = String.IsNullOrEmpty(_Params.EndDate) ? new SqlParameter("@EndDate", DBNull.Value) : new SqlParameter("@EndDate", ConvertDatetimeDB(_Params.EndDate));
                var getObjData = await objEngine.ExecuteCommandAsync("WebNtfyEventSearch", CommandType.StoredProcedure, Parameters);

                while (getObjData.Read())
                {
                    var info = new LookupParameters
                    {
                        Id = Convert.ToString(getObjData["EvtId"]),
                        SeletedEventInd = Convert.ToString(getObjData["EvtTypeInd"]),
                        ShortDescp      = Convert.ToString(getObjData["EvtShorDescp"]),
                        SelectedReason  = Convert.ToString(getObjData["EvtReason"]),
                        SelectedRefTo   = Convert.ToString(getObjData["Refto"]),
                        RefKey          = Convert.ToString(getObjData["RefKey"]),
                        SelectedOwner   = Convert.ToString(getObjData["OwnerType"]),
                        CreationDate    = Convert.ToString(getObjData["CreationDate"]),
                        CompanyName     = Convert.ToString(getObjData["CmpyName"]),
                        Channel         = Convert.ToString(getObjData["Channel"])
                    };
                    list.Add(info);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
示例#24
0
        public async Task <IEnumerable <LookupParameters> > WebProdRefSelect(string ProdCd)
        {
            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("@ProdCd", String.IsNullOrEmpty(ProdCd) ? (object)DBNull.Value : ProdCd);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebProdRefSelect", CommandType.StoredProcedure, Parameters);

                var _Parameters = new List <LookupParameters>();
                while (execResult.Read())
                {
                    var _Parameter = new LookupParameters
                    {
                        ProductCode             = Convert.ToString(execResult["ProdCd"]),
                        Descp                   = Convert.ToString(execResult["ShortDescp"]),
                        ProdDescp               = Convert.ToString(execResult["ProdDescp"]),
                        SelectedProductCategory = Convert.ToString(execResult["ProdCategory"]),
                        SelectedProductType     = Convert.ToString(execResult["ProdType"]),
                        SelectedBillingPlan     = Convert.ToString(execResult["BillingPlan"]),
                        UnitPrice               = ConverterDecimal(execResult["UnitPrice"]),
                        EffectiveFrom           = Convert.ToString(execResult["EffDate"]),
                        ExpiryDate              = Convert.ToString(execResult["EffEndDate"]),
                        LastUpdated             = Convert.ToString(execResult["UpdateDate"]),
                        UserId                  = Convert.ToString(execResult["UserId"]),
                        ProdId                  = Convert.ToString(execResult["ProdId"])
                    };

                    _Parameters.Add(_Parameter);
                }
                return(_Parameters);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#25
0
        public async Task <List <LookupParameters> > WebRebatePlanListSelect()
        {
            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("WebRebatePlanListSelect", CommandType.StoredProcedure, Parameters);

                var list = new List <LookupParameters>();
                while (getObjData.Read())
                {
                    var item = new LookupParameters
                    {
                        PlanId                = Convert.ToString(getObjData["PlanId"]),
                        Descp                 = Convert.ToString(getObjData["Descp"]),
                        type                  = Convert.ToString(getObjData["Type"]),
                        EffectiveFrom         = DateConverter(getObjData["Effective Date"]),
                        ExpiryDate            = DateConverter(getObjData["Expired Date"]),
                        LastUpdated           = Convert.ToString(getObjData["Plans Update Date"]),
                        MinPurchaseAmt        = ConverterDecimal(getObjData["MinPurchAmt"]),
                        SubSeqPurchaseAmt     = ConverterDecimal(getObjData["SubseqPurchAmt"]),
                        SubSeqBillingAmt      = ConverterDecimal(getObjData["SubseqBillingAmt"]),
                        BillingPlanUserId     = Convert.ToString(getObjData["BillingPlanUserId"]),
                        BillingPlanLastUpdate = Convert.ToString(getObjData["BillingPlanLastUpdate"]),
                        PlanUserId            = Convert.ToString(getObjData["PlanUserId"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
示例#26
0
        public async Task <List <LookupParameters> > WebRebatePlanSelect(string PlanId)
        {
            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("@PlanId", String.IsNullOrEmpty(PlanId) ? (object)DBNull.Value : PlanId);
                var execResult = await objDataEngine.ExecuteCommandAsync("WebRebatePlanSelect", CommandType.StoredProcedure, Parameters);

                var _Parameters = new List <LookupParameters>();
                while (execResult.Read())
                {
                    var _Parameter = new LookupParameters
                    {
                        PlanId                = Convert.ToString(execResult["PlanId"]),
                        Descp                 = Convert.ToString(execResult["Descp"]),
                        EffectiveFrom         = DateConverter(execResult["Effective Date"]),
                        ExpiryDate            = DateConverter(execResult["Expired Date"]),
                        SelectedType          = Convert.ToString(execResult["Type"]),
                        LastUpdated           = DateConverter(execResult["Plan_UpdateDate"]),
                        MinPurchaseAmt        = ConverterDecimal(execResult["TierValue"]),
                        SubSeqPurchaseAmt     = ConverterDecimal(execResult["BasisValue"]),
                        SubSeqBillingAmt      = ConverterDecimal(execResult["BillValue"]),
                        BillingPlanLastUpdate = Convert.ToString("PlanDetail_UpdateDate"),
                        UserId                = Convert.ToString(execResult["UserId"]),
                    };

                    _Parameters.Add(_Parameter);
                }
                return(_Parameters);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#27
0
        public async Task <MsgRetriever> WebProdGroupRefMaint(LookupParameters _LookupParameters)
        {
            var objDataEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objDataEngine.InitiateConnectionAsync();

                SqlParameter[] Parameters = new SqlParameter[6];
                SqlCommand     cmd        = new SqlCommand();
                Parameters[0] = new SqlParameter("@IssNo", GetIssNo);
                Parameters[1] = String.IsNullOrEmpty(_LookupParameters.SelectedProductGroup) ? new SqlParameter("@ProdGroup", DBNull.Value) : new SqlParameter("@ProdGroup", _LookupParameters.SelectedProductGroup);
                Parameters[2] = String.IsNullOrEmpty(_LookupParameters.Descp) ? new SqlParameter("@ProdDescp", DBNull.Value) : new SqlParameter("@ProdDescp", _LookupParameters.Descp);
                Parameters[3] = new SqlParameter("@UserId", GetUserId);
                DataTable dt = new DataTable();
                dt.Columns.Add("ProdCd");
                foreach (var item in _LookupParameters.ProductItems)
                {
                    DataRow dr = dt.NewRow();
                    dr["ProdCd"] = item.ProductCode;
                    dt.Rows.Add(dr);
                }

                Parameters[4]           = new SqlParameter("@ProdDetail", dt);
                Parameters[5]           = new SqlParameter("@RETURN_VALUE", SqlDbType.BigInt);
                Parameters[5].Direction = ParameterDirection.ReturnValue;
                var Cmd = await objDataEngine.ExecuteWithReturnValueAsync("[WebProdGroupRefMaint]", CommandType.StoredProcedure, Parameters);

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

                return(Descp);
            }
            finally
            {
                objDataEngine.CloseConnection();
            }
        }
示例#28
0
        /// <summary>
        /// Get Web User Access
        /// </summary>
        /// <returns></returns>
        public async static Task <IEnumerable <SelectListItem> > WebGetUserAccess(string userAccess, bool PrependNull = true)
        {
            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", 1);
                Parameters[1] = new SqlParameter("@DropDown", String.IsNullOrEmpty(userAccess) ? (object)DBNull.Value : userAccess);

                var getObjData = await objEngine.ExecuteCommandAsync("WebDropDownInfo", 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["Name"]),
                        Value = Convert.ToString(getObjData["UserId"]),
                    });
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
示例#29
0
        //WebEventSelect

        #endregion

        #region "Account Level"

        public async Task <List <LookupParameters> > WebEventAcctConfListSelect(string RefTo, string RefKey)
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] parameters = new SqlParameter[2];
                parameters[0] = new SqlParameter("@RefKey", string.IsNullOrEmpty(RefKey) ? (object)DBNull.Value : RefKey);
                parameters[1] = new SqlParameter("@RefTo", string.IsNullOrEmpty(RefTo) ? (object)DBNull.Value : RefTo);
                var getObjData = await objEngine.ExecuteCommandAsync("[WebEventAcctConfListSelect]", CommandType.StoredProcedure, parameters);

                var list = new List <LookupParameters>();
                while (getObjData.Read())
                {
                    var item = new LookupParameters
                    {
                        EventTypeId     = Convert.ToString(getObjData["EventTypeId"]),
                        EventScheduleId = Convert.ToString(getObjData["EventScheduleId"]),
                        type            = Convert.ToString(getObjData["Type"]),
                        ShortDescp      = Convert.ToString(getObjData["Short Description"]),
                        DetailedDescp   = Convert.ToString(getObjData["Detailed Description"]),
                        SelectedStatus  = Convert.ToString(getObjData["Status"]),
                        LastUpdated     = Convert.ToString(getObjData["Update Date"]),
                        UpdatedBy       = Convert.ToString(getObjData["Update By"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }
示例#30
0
        public async Task <List <LookupParameters> > WebNtfyEvtConfListSelect()
        {
            var objEngine = new FleetDataEngine(AccessMode.CardHolder, DBType.Maint);

            try
            {
                await objEngine.InitiateConnectionAsync();

                SqlParameter[] parameters = new SqlParameter[1];
                parameters[0] = new SqlParameter("@UserId", GetUserId);
                var getObjData = await objEngine.ExecuteCommandAsync("[WebNtfyEvtConfListSelect]", CommandType.StoredProcedure, parameters);

                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["ShortDescp"]),
                        DetailedDescp     = Convert.ToString(getObjData["Descp"]),
                        SelectedRefTo     = Convert.ToString(getObjData["RefTo"]),
                        RefKey            = Convert.ToString(getObjData["RefKey"]),
                        SelectedStatus    = Convert.ToString(getObjData["Status"]),
                        LastUpdated       = Convert.ToString(getObjData["UpdateDate"]),
                        UpdatedBy         = Convert.ToString(getObjData["UpdateBy"])
                    };
                    list.Add(item);
                }
                return(list);
            }
            finally
            {
                objEngine.CloseConnection();
            }
        }