Example #1
0
        public ActionResult Delete(string id = null)
        {
            AccountList         accList = new AccountList();
            List <AccountClass> obj     = accList.GetAccountClass(id);

            return(View(obj.FirstOrDefault()));
        }
Example #2
0
        // GET: Accounts
        public ActionResult Index(string strSearch)
        {
            RoleClass roleDDL = new RoleClass();

            using (DbModel db = new DbModel())
            {
                roleDDL.Id_Role = db.StoreModel.
            }

            AccountList         accList = new AccountList();
            List <AccountClass> obj     = accList.GetAccountClass(string.Empty).OrderBy(x => x.Id_Account).ToList();

            if (!string.IsNullOrEmpty(strSearch))
            {
                obj = obj.Where(x => x.Account.Contains(strSearch) || x.Password.Contains(strSearch) || x.Role.Contains(strSearch)).ToList();
            }
            @ViewBag.strSearch = strSearch;
            return(View(obj));
        }