// GET: public ActionResult AccountCreate() { GetAccounts g = new GetAccounts(); SelectList s = g.AccountPersonSelectList("Mike"); ViewBag.accountpersons = s; SelectList s2 = g.AccountTypesSelectList("Expenses"); ViewBag.accounttypes = s2; return(View()); }
public ActionResult Index() { int year = DateTime.Today.Year - 1; ViewBag.firstDay = "01/01/" + year.ToString(); ViewBag.lastDay = "12/31/" + year.ToString(); GetAccounts g = new GetAccounts(); SelectList s = g.AccountPersonSelectList("Allen"); ViewBag.accountpersons = s; return(View()); }
// GET: public ActionResult AccountEdit(string id) { var collection = context.db.GetCollection <Account>("Accounts"); Account account = collection.Find(x => x.Id == ObjectId.Parse(id)).FirstOrDefault(); GetAccounts g = new GetAccounts(); SelectList s = g.AccountPersonSelectList(account.AccountPerson.AccountPerson1); ViewBag.accountpersons = s; SelectList s2 = g.AccountTypesSelectList(account.AccountSubType.AccountType.AccountType1); ViewBag.accounttypes = s2; return(View(account)); }