Exemplo n.º 1
0
        public ActionResult Index(string Search = "", int Pagesize = 10)
        {
            KycFilterModel model = new KycFilterModel();

            model.KycStatusList = ApplicationUtilities.SetDDLValue(LoadDropdownList("kycstatus") as Dictionary <string, string>, model.KycStatus, "--Status--");
            KycFilterCommon filterCommon = new KycFilterCommon();

            filterCommon = model.MapObject <KycFilterCommon>();
            List <KYCCommon> kycCommon = _kyc.GetAgentList(filterCommon);
            List <KYCModel>  kycModel  = kycCommon.MapObjects <KYCModel>();

            foreach (var item in kycModel)
            {
                item.Action = StaticData.GetActions(ControllerName, item.AgentId.EncryptParameter(), this, "", "", item.KycStatus);

                #region kycStatus
                if (item.KycStatus.ToUpper().Equals("PENDING"))
                {
                    item.KycStatus = "<span class='badge badge-warning'>Pending</span>";
                }
                else if (item.KycStatus.ToUpper().Equals("APPROVED"))
                {
                    item.KycStatus = "<span class='badge badge-success'>Approved</span>";
                }
                else if (item.KycStatus.ToUpper().Equals("REJECTED"))
                {
                    item.KycStatus = "<span class='badge badge-danger'>Rejected</span>";
                }
                else
                {
                    item.KycStatus = "<span class='badge badge-info'>Not Filled</span>";
                }
                #endregion
            }
            //Column Creator
            IDictionary <string, string> param = new Dictionary <string, string>();
            //param.Add("AgentId", "Agent Id");
            param.Add("MobileNo", "Mobile No");
            param.Add("EmailAddress", "Email");
            param.Add("SubmittedDate", "Submitted Date");
            param.Add("KycStatus", "Status");
            param.Add("Action", "Action");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(kycModel, "hidebreadcrumb", Search, Pagesize, false, "", "", "", "KYC", "", "KYC");
            ViewData["grid"] = grid;


            ViewBag.EmptyMessage = "False";
            return(View(model));
            //return View(kycModel);
        }
Exemplo n.º 2
0
        // GET: KYC List
        public ActionResult Index(string Search = "", int Pagesize = 10)
        {
            List <KYCCommon> kycCommon = _kyc.GetAgentList();
            List <KYCModel>  kycModel  = kycCommon.MapObjects <KYCModel>();

            foreach (var item in kycModel)
            {
                #region kycStatus
                if (item.KycStatus.ToUpper().Equals("PENDING"))
                {
                    item.KycStatus = "<span class='badge badge-warning'>Pending</span>";
                }
                else if (item.KycStatus.ToUpper().Equals("APPROVED"))
                {
                    item.KycStatus = "<span class='badge badge-success'>Approved</span>";
                }
                else if (item.KycStatus.ToUpper().Equals("REJECTED"))
                {
                    item.KycStatus = "<span class='badge badge-danger'>Rejected</span>";
                }
                else
                {
                    item.KycStatus = "<span class='badge badge-info'>Not Filled</span>";
                }
                #endregion
                item.Action = StaticData.GetActions(ControllerName, item.AgentId.EncryptParameter(), this, "", "", "");
            }
            //Column Creator
            IDictionary <string, string> param = new Dictionary <string, string>();
            param.Add("AgentId", "Agent Id");
            param.Add("MobileNo", "Mobile No");
            param.Add("EmailAddress", "Email");
            param.Add("SubmittedDate", "Submitted Date");
            param.Add("KycStatus", "Status");
            param.Add("Action", "Action");
            ProjectGrid.column = param;
            //Ends
            var grid = ProjectGrid.MakeGrid(kycModel, "", Search, Pagesize, false, "", "", "", "KYC", "", "KYC");
            ViewData["grid"] = grid;

            return(View());
            //return View(kycModel);
        }