public virtual ActionResult Edit(int?id) { BankAccountViewModel model = new BankAccountViewModel(); if (id.HasValue) { //napuni model po id-u model = BankAccountsManager.GetAccount(id.Value); } else { //može biti za New, svo props će biti prazni } return(View("Edit", model)); }
public virtual ActionResult GetBankAccountListAjax(DataTablesRequestModel model) { int sortColumnId = 0; string sortDirection = String.Empty; if (model.Order.Count() > 0) { sortColumnId = model.Order.FirstOrDefault().Column; sortDirection = model.Order.FirstOrDefault().Dir; } var result = BankAccountsManager.GetBankAccountDataTable(model.Length, model.Start, model.Search.Value, sortColumnId, sortDirection); return(Json(result, JsonRequestBehavior.AllowGet)); }
// GET: api/BankAccount public IEnumerable <BankAccountViewModel> Get() { return(BankAccountsManager.GetAccounts()); }
public ActionResult GetNameAutocomplete(string term) { var result = BankAccountsManager.GetAccounts(term); return(Json(result)); }
// GET: Account public virtual ActionResult Index() { List <BankAccountViewModel> model = BankAccountsManager.GetAccounts(); return(View("Index", model)); }