public ActionResult Index() { SetOfBookListModel model = new SetOfBookListModel(); var list = service.GetByCompanyId(AuthenticationHelper.User.CompanyId); model.SetOfBooks = list.Select(a => new SetOfBookModel(a)).ToList(); return(View(model)); }
public ActionResult Create() { AccountCreateViewModel model = new AccountCreateViewModel(); model.SetOfBooks = sobService.GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }).ToList(); return(View(model)); }
public ActionResult TrialBalance() { TrialBalanceCriteriaModel model = new TrialBalanceCriteriaModel(); model.SetOfBooks = sobService.GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }).ToList(); model.CodeCombinations = getCodeCombinationList(Convert.ToInt32(model.SetOfBooks.First().Value)); model.Periods = getPeriodList(model.SetOfBooks.First().Value); return(View(model)); }
public ActionResult Index() { var model = new CurrencyListModel(); if (model.SetOfBooks == null) { model.SetOfBooks = sobService .GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }).ToList(); } model.SOBId = Convert.ToInt64(model.SetOfBooks.First().Value); return(View(model)); }
public ActionResult Index(AccountValueListModel model) { if (model.SetOfBooks == null) { model.SetOfBooks = sobService.GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }).ToList(); } if (model.Segments == null && model.SetOfBooks.Any()) { model.Segments = getSegmentList(model.SetOfBooks.First().Value.ToString()); } model.AccountValues = service.GetAll(AuthenticationHelper.User.CompanyId).Select(x => new AccountValueViewModel(x)).ToList(); return(View(model)); }
public ActionResult Index(CodeCombinitionListModel model) { if (model.SetOfBooks == null) { model.SetOfBooks = sobService .GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString(), Selected = x.Id == model.SOBId ? true : false }).ToList(); } model.CodeCombinitions = service.GetAll(AuthenticationHelper.User.CompanyId, model.SOBId != 0 ? model.SOBId : Convert.ToInt64(model.SetOfBooks.First().Value), model.SearchText, true, model.Page, model.SortColumn, model.SortDirection) .Select(x => new CodeCombinitionViewModel(x)).ToList(); return(View(model)); }
public ActionResult Index(CalendarListModel model) { if (model.SetOfBooks == null) { model.SetOfBooks = sobService .GetByCompanyId(AuthenticationHelper.User.CompanyId) .Select(x => new SelectListItem { Text = x.Name, Value = x.Id.ToString() }).ToList(); } if (model.SOBId != 0 || model.SetOfBooks != null) { model.Calendars = getCalendarList(model); } return(View(model)); }
public static List <SetOfBookModel> GetSetOfBooks() { return(service.GetByCompanyId(AuthenticationHelper.CompanyId.Value) .Select(x => new SetOfBookModel(x)).ToList()); }