Beispiel #1
0
        public ActionResult CardApprovalList()
        {
            var cardCommonList = _card.GetApprovalList();
            //Actions
            var cardType = _card.GetCardType();//.FirstOrDefault(x => x.Key == item.CardType);

            foreach (var item in cardCommonList)
            {
                item.Action   = StaticData.GetActions("CardApproval", item.RequestId.EncryptParameter(), this, "", "", item.CardType);
                item.CardType = cardType.FirstOrDefault(x => x.Key == item.CardType).Value;;
            }
            //Column Creator
            IDictionary <string, string> param = new Dictionary <string, string>();

            param.Add("UserName", "Name");
            param.Add("MobileNo", "Mobile Number");
            param.Add("Email", "Email");
            param.Add("CardType", "Card type");
            //param.Add("CardType", "Card No.");
            param.Add("CreatedLocalDate", "Issue Date");
            //param.Add("ExpiryDate", "Expiry Date");
            param.Add("RequestStatus", "Status");
            param.Add("Action", "Action");
            ProjectGrid.column = param;
            //Ends
            //Add New
            var grid = ProjectGrid.MakeGrid(cardCommonList, "", "", 0, false, "", "", "Home", "Card");

            ViewData["grid"] = grid;
            if (cardCommonList.Count() == 0)
            {
                ViewBag.EmptyMessage = "True";
            }
            return(View());
        }