public ActionResult Create(long sobId, string segment) { AccountValueViewModel model = new AccountValueViewModel(); if (accountService.GetAccountBySOBId(sobId.ToString(), AuthenticationHelper.User.CompanyId) != null) { model.ChartId = accountService.GetAccountBySOBId(sobId.ToString(), AuthenticationHelper.User.CompanyId).Id; model.SetOfBook = sobService.GetSingle(sobId.ToString(), AuthenticationHelper.User.CompanyId).Name; model.Segment = segment; return(View("Edit", model)); } return(RedirectToAction("Index")); }
public ActionResult Create(long sobId, long periodId, long currencyId) { if (sobId > 0 && periodId > 0 && currencyId > 0) { JournalVoucherCreateModel model = new JournalVoucherCreateModel(); model.SOBId = sobId; model.PeriodId = periodId; model.CurrencyId = currencyId; model.SOBName = sobService.GetSingle(sobId.ToString(), AuthenticationHelper.User.CompanyId).Name; SessionHelper.Calendar = new CalendarViewModel(calendarService.GetSingle(periodId.ToString(), AuthenticationHelper.User.CompanyId)); model.GLDate = SessionHelper.Calendar.StartDate; model.ConversionRate = 1; model.PeriodName = SessionHelper.Calendar.PeriodName; model.CurrencyName = currencyService.GetSingle(currencyId.ToString(), AuthenticationHelper.User.CompanyId).Name; model.CodeCombinationList = codeCombinitionService.GetAll(AuthenticationHelper.User.CompanyId, model.SOBId, "", false, null, "", "") .Select(x => new SelectListItem { Text = x.CodeCombinitionCode, Value = x.Id.ToString() }).ToList(); return(View(model)); } else { return(RedirectToAction("Index")); } }
public ActionResult Edit(string id) { AccountCreateViewModel model = new AccountCreateViewModel(service.GetSingle(id, AuthenticationHelper.User.CompanyId)); SetOfBook sob = sobService.GetSingle(model.SOBId.ToString(), AuthenticationHelper.User.CompanyId); model.SetOfBooks = new List <SelectListItem>(); model.SetOfBooks.Add(new SelectListItem { Text = sob.Name, Value = sob.Id.ToString() }); return(View(model)); //Opens popup in grid.. }
public ActionResult Edit(string id) { SetOfBookModel model = new SetOfBookModel(service.GetSingle(id, AuthenticationHelper.User.CompanyId)); return(View(model)); }
public static SetOfBookModel GetSetOfBook(string id) { SetOfBookModel model = new SetOfBookModel(service.GetSingle(id, AuthenticationHelper.CompanyId.Value)); return(model); }