public ActionResult CreateOrUpdate(string id) { var model = new HoSoViewModel(); ViewBag.LoaiHoSos = SelectListItemFromDomain.SelectListItem_LoaiHoSo(_loaiHoSoService.GetAll(m => m.OrderBy(t => t.Ten))); ViewBag.TapHoSos = SelectListItemFromDomain.SelectListItem_HoSo(_hoSoService.GetAll(m => m.OrderBy(t => t.PhongLuuTru))); if (string.IsNullOrEmpty(id)) { return(View(model)); } else { var hoSo = _hoSoService.Get(m => m.Id == id); model = GetHoSo(hoSo); return(View(model)); } }
public void DropDowmn() { var dangs = new List <object> { GlobalConfigs.DANG_DEN, GlobalConfigs.DANG_NOIBO }; ViewBag.LoaiHoSos = SelectListItemFromDomain.SelectListItem_LoaiHoSo(_loaiHoSoService.GetAll(m => m.OrderBy(t => t.Ten))); ViewBag.NoiBanHanhs = SelectListItemFromDomain.SelectListItem_NoiBanHanh(_noiBanHanhService.GetAll(m => m.OrderBy(t => t.Ten))); ViewBag.Dangs = SelectListItemFromDomain.SelectListItem_Object(dangs); }