Exemplo n.º 1
0
        //Details of Expense
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(RedirectToAction("Error", "Home"));
            }
            ExpenseResultVM expenseResultVM = expenseBll.GetExpenseDetail(id);

            return(View(expenseResultVM));
        }
Exemplo n.º 2
0
        internal ExpenseResultVM GetExpenseDetail(int?id)
        {
            Expense         expense         = expenseDal.GetExpenseDetail(id);
            ExpenseResultVM expenseResultVM = new ExpenseResultVM();

            if (expense != null)
            {
                expenseResultVM.ExpenseNo      = expense.Id.ToString();
                expenseResultVM.Date           = expense.Date;
                expenseResultVM.Outlet         = expense.Outlet.Name;
                expenseResultVM.Employee       = expense.Employee.Name;
                expenseResultVM.Total          = Convert.ToDouble(expense.Total);
                expenseResultVM.Due            = Convert.ToDouble(expense.Due);
                expenseResultVM.ExpenseDetails = expense.ExpenseDetails;
            }



            return(expenseResultVM);
        }