Example #1
0
        public ActionResult Create()
        {
            var person    = new PlatformUserCq().GetUserInfo(s => s.Id.Equals(User.Identity.GetUserId()));
            var members   = new FundWalletLogic().GetAgent();
            var getAgents = person.Position == "Platform Manager" ? members.Where(s => s.Agency.Equals(person.Agency)) :
                            (person.Position == "Regional Manager" ? members.Where(s => s.Agency.Equals(person.Agency) && s.RegionName.Equals(person.RegionName)) :
                             ((person.Position == "State Manager" ? members.Where(s => s.Agency.Equals(person.Agency) && s.RegionName.Equals(person.RegionName) && s.StateName.Equals(person.StateName)) :
                               ((person.Position == "Area Manager" ? members.Where(s => s.Agency.Equals(person.Agency) && s.RegionName.Equals(person.RegionName) && s.StateName.Equals(person.StateName) && s.Area.Equals(person.Area)) :
                                 ((person.Position == "Zonal Manager" ? members.Where(s => s.Agency.Equals(person.Agency) && s.RegionName.Equals(person.RegionName) && s.StateName.Equals(person.StateName) && s.Area.Equals(person.Area) && s.Zone.Equals(person.Zone)) :
                                   members.Where(s => s.Agency.Equals(person.Agency) && s.RegionName.Equals(person.RegionName) && s.StateName.Equals(person.StateName) && s.Area.Equals(person.Area) && s.Zone.Equals(person.Zone) && s.Clusta.Equals(person.Clusta))
                                   )))))));

            ViewBag.Agent = new SelectList(getAgents, "Pid", "FullDetail");
            return(View());
        }
        public IHttpActionResult Balance(string username)
        {
            var walletStatuses = new FundWalletLogic().GetBalance(s => s.Email.ToLower().Equals(username.ToLower()));

            return(Ok(walletStatuses));
        }