// GET: Admin/CustomerManagement
        public ActionResult Index(string ParentId = "", string Search = "", int Pagesize = 20)
        {
            if (!string.IsNullOrEmpty(ParentId))
            {
                ParentId = ParentId.DecryptParameter();
            }
            else
            {
                ParentId = ApplicationUtilities.GetSessionValue("AgentId").ToString();
            }
            List <WalletUserInfoModel> lst = _CustomerManagement.WalletUserList("WalletUser", ParentId: ParentId).MapObjects <WalletUserInfoModel>();

            foreach (var item in lst)
            {
                item.Action      = StaticData.GetActions(ControllerName, item.AgentId.ToString().EncryptParameter(), this, "", "", item.AgentStatus, item.UserId.EncryptParameter());
                item.AgentStatus = "<span class='badge badge-" + (item.AgentStatus.Trim().ToUpper() == "Y" ? "success" : "danger") + "'>" + (item.AgentStatus.Trim().ToUpper() == "Y" ? "Active" : "Blocked") + "</span>";
                #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
            }
            IDictionary <string, string> param = new Dictionary <string, string>();
            param.Add("MobileNo", "Mobile No");
            param.Add("Email", "Email");
            param.Add("FullName", "Name");
            //param.Add("AgentId", "Agent Id");
            //param.Add("ParentId", "Parent Id");
            param.Add("Balance", "Balance");
            param.Add("KycStatus", "Kyc Status");
            param.Add("AgentStatus", "Status");
            param.Add("CreatedLocalDate", "Registered Date");
            param.Add("Action", "Action");
            ProjectGrid.column = param;
            var grid = ProjectGrid.MakeGrid(lst, "", Search, Pagesize, true, "", "", "Home", "Customer", "/Admin/CustomerManagement", "/Admin/CustomerManagement/AddCustomer?parentid=" + ParentId.EncryptParameter());
            ViewData["grid"] = grid;
            return(View());
        }
示例#2
0
        public ActionResult UserList(string Search = "", int Pagesize = 20)
        {
            string ParentId = Session["UserId"].ToString();
            List <WalletUserInfoModel> lst = _CLientManagement.WalletUserList("WalletUser", ParentId: ParentId).MapObjects <WalletUserInfoModel>();

            foreach (var item in lst)
            {
                item.Action      = StaticData.GetActions("ClientUserList", item.AgentId.ToString().EncryptParameter(), this, "", "", item.AgentStatus, item.UserId.EncryptParameter());
                item.AgentStatus = "<span class='badge badge-" + (item.AgentStatus.Trim().ToUpper() == "Y" ? "success" : "danger") + "'>" + (item.AgentStatus.Trim().ToUpper() == "Y" ? "Active" : "Blocked") + "</span>";
            }
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("MobileNo", "Mobile No.");
            param.Add("Email", "Email");
            param.Add("FullName", "Name");
            param.Add("KycStatus", "Kyc Status");
            param.Add("AgentStatus", "Status");
            //param.Add("Balance", "Balance");
            param.Add("CreatedLocalDate", "Registered Date");
            param.Add("Action", "Action");
            ProjectGrid.column = param;
            var grid = ProjectGrid.MakeGrid(lst, "", Search, Pagesize, true, "", "", "Home", "User", "/Client/ClientUser/UserList", "/Client/ClientUser/AddClient");

            ViewData["grid"] = grid;
            return(View());
        }