Пример #1
0
        // GET: transaction/Create
        public ActionResult Create()
        {
            #region Account list
            var accountService = new AccountService();
            #endregion

            #region Customer List
            var customerService = new CustomerService();
            #endregion

            #region TransactionType List
            var transactionTypeService = new TransactionTypeService();
            #endregion

            var model = new TransactionModel()
            {
                AccountList         = accountService.GetSelectList(),
                CustomerList        = customerService.GetSelectList(),
                TransactionTypeList = transactionTypeService.GetSelectList(),
            };
            return(View(model));
        }
Пример #2
0
        // GET: Account/Edit/5
        public ActionResult Edit(int id)
        {
            #region Account list
            var accountService = new AccountService();
            #endregion

            #region Customer List
            var customerService = new CustomerService();
            #endregion

            #region TransactionType List
            var transactionTypeService = new TransactionTypeService();
            #endregion

            var model = new TransactionModel()
            {
                Transaction         = _service.GetDetails(id),
                AccountList         = accountService.GetSelectList(),
                CustomerList        = customerService.GetSelectList(),
                TransactionTypeList = transactionTypeService.GetSelectList(),
            };
            return(View(model));
        }