public ActionResult Details(long?id) { var bill = billService.GetById(id ?? 0) ?? new Bill(); var viewModel = new BillDetailViewModel { Bill = bill, Currency = currencyService.GetById(bill.CurrencyId ?? 0) ?? new Currency(), Vendor = vendorService.GetById(bill.VendorId ?? 0) ?? new Vendor(), Branch = branchService.GetById(LogedInUser.BranchId ?? 0) }; return(View(viewModel)); }
public ActionResult GetVendorById(int vendorId) { var item = vendorService.GetById(vendorId); return(Json(item, JsonRequestBehavior.AllowGet)); }