// // GET: /Stay/Stay/ public ActionResult Index(int?dtpSelectRange, DateTime?dtpFromDate, DateTime?dtpToDate) { ToolbarMenuHelpers.SetToolBar(ViewData, new { New = "Insert", Date = "Index" }, "Stay", null, null, ref dtpSelectRange, ref dtpFromDate, ref dtpToDate); return(View(stayRepo.FindAll(dtpFromDate, dtpToDate).ToList())); }
private ActionResult doInsert(VisaDetail visa) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "Visa"); //makeReferenceViewData(); return(View(visa)); }
private ActionResult doInsert(ReEntry reentry) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "ReEntry"); //makeReferenceViewData(); return(View(reentry)); }
private ActionResult doInsert(Endorse endorse) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "Endorse"); //makeReferenceViewData(); return(View(endorse)); }
private ActionResult doInsert(ConveyanceInOut convInOut) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "ConveyanceInOut"); //makeReferenceViewData(); convInOut.Code = convInOutRepo.GetNewCode(); return(View(convInOut)); }
private ActionResult doInsert(Staying90Day stay) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "Stay"); //makeReferenceViewData(); stay.Code = stayRepo.GetNewCode(); return(View(stay)); }
private ActionResult doInsert(AddRemoveCrew addRemoveCrew, int addRemoveType) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", Close = "Index2" }, "AddRemoveCrew", new { addRemoveType }); //makeReferenceViewData(); ViewData["AddRemoveType"] = addRemoveType; return(View(addRemoveCrew)); }
public ViewResult Index(bool?isShowRow) { ToolbarMenuHelpers.SetToolBar(ViewData, new { New = "Register" }, "Account", new { area = "" }); return(View(new IndexViewModel { Users = _userService.FindAll(0, 100000), Roles = _rolesService.FindAll(), IsShowRow = isShowRow ?? false })); }
private ActionResult doEdit(AddRemoveCrew addRemoveCrew, int addRemoveType, bool?backToSearch = null) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", GiveUp = "btnDelete", Close = "Index2" }, "AddRemoveCrew", new { addRemoveType, backToSearch }); ViewData["AddRemoveType"] = addRemoveType; if (addRemoveCrew != null) { return(View(addRemoveCrew)); } else { TempData.AddError(Resources.Messages.NotFoundData); return(RedirectToAction("Index2", new { addRemoveType })); } }
// // GET: /Search/Search/ public ActionResult Index() { if (searchRepo.AlienSearch == null) { searchRepo.AlienSearch = new AlienSearchInfo(Globals.WantVisa, Globals.WantReEntry, Globals.WantEndorse, Globals.WantStay, Globals.WantShip); } int? dtpSelectRange = searchRepo.AlienSearch.dtpSelectRange; DateTime?dtpFromDate = searchRepo.AlienSearch.dtpFromDate; DateTime?dtpToDate = searchRepo.AlienSearch.dtpToDate; ToolbarMenuHelpers.SetToolBar(ViewData, new { Print = "AlienListReport", Print1 = "AlienListReport", Print2 = "AlienListReportXLS", Print3 = "AlienDetailReport", Date = "Index", New = "#", //ใส่กรณีที่มี submenu แต่ไม่ต้องการให้มี action กระทำการใด ๆ New1 = "Visa/Visa/Insert", New2 = "Visa/ReEntry/Insert", New3 = "Visa/Endorse/Insert", New4 = "Visa/Stay/Insert" }, "Search", null, new { Print1 = "พิมพ์รายการติดต่อบุคคลต่างด้าว", Print2 = "พิมพ์รายการติดต่อบุคคลต่างด้าว (Excel)", Print3 = "พิมพ์รายละเอียดบุคคลต่างด้าว", New1 = "เพิ่มรายการขอต่ออายุ", New2 = "เพิ่มรายการ Re-Entry", New3 = "เพิ่มรายการสลักหลังถิ่นที่อยู่", New4 = "เพิ่มรายการรายงานตัว 90 วัน" }, ref dtpSelectRange, ref dtpFromDate, ref dtpToDate); //ไม่ต้องใส่ค่ากลับให้ dtpSelectRange เพราะในนั้นมัน set เป็น 0 searchRepo.AlienSearch.dtpFromDate = dtpFromDate; searchRepo.AlienSearch.dtpToDate = dtpToDate; var searchData = new AlienSearchViewModel(searchRepo.AlienSearch, aTranRepo.FindAll(searchRepo.AlienSearch).ToList()); return(View(searchData)); }
public ActionResult Index(int addRemoveType, int?dtpSelectRange, DateTime?dtpFromDate, DateTime?dtpToDate) { ToolbarMenuHelpers.SetToolBar(ViewData, new { New = "Insert", Date = "Index" }, "AddRemoveCrew", new { addRemoveType }, null, ref dtpSelectRange, ref dtpFromDate, ref dtpToDate); ViewData["AddRemoveType"] = addRemoveType; return(View(addRemoveCrewRepo.FindAll(addRemoveType, dtpFromDate, dtpToDate).ToList())); }
private ActionResult doEdit(ConveyanceInOut convInOut, bool?backToSearch = null) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", GiveUp = "btnDelete", Close = "Index2" }, "ConveyanceInOut", new { backToSearch }); //ส่งผ่านตัวแปรเพื่อทำ combobox //makeReferenceViewData(); if (convInOut != null) { return(View(convInOut)); } else { TempData.AddError(Resources.Messages.NotFoundData); return(RedirectToAction("Index2")); } }
private ActionResult doEdit(Staying90Day stay) { ToolbarMenuHelpers.SetToolBar(ViewData, new { Save = "btnSave", New = "Insert", GiveUp = "btnDelete", Close = "Index2" }, "Stay"); //ส่งผ่านตัวแปรเพื่อทำ combobox //makeReferenceViewData(); if (stay != null) { return(View(stay)); } else { TempData.AddError(Resources.Messages.NotFoundData); return(RedirectToAction("Index2")); } }
public ActionResult Index(int?refTypeId) { if (refTypeId == null) { return(View("Blank")); } //the grid called... 2?Grid-mode=insert ToolbarMenuHelpers.SetToolBar(ViewData, new { New = "Index" }, "Reference", new RouteValueDictionary { { "Grid-mode", "insert" }, { "refTypeId", refTypeId } }, null, true); ReferenceViewModel refVM = new ReferenceViewModel(refRepo, refTypeId ?? 0); populateReferences(refTypeId ?? 0); return(View("Index", refVM)); }
// // GET: /Visa/ public ActionResult Index(int?dtpSelectRange, DateTime?dtpFromDate, DateTime?dtpToDate) { ToolbarMenuHelpers.SetToolBar(ViewData, new { //Save = "Save", //กรณีปุ่ม Save/GiveUp ให้ link ไปที่ id ของปุ่ม save จริง ๆ ของฟอร์ม New = "Insert", //GiveUp = "Delete", //Print = "Print", //Print1 = "Print", //Other = "Other", //Other1 = "Other", Date = "Index" }, "Visa", null, null, //new { Other1 = "อื่น ๆ ลองดู", }, ref dtpSelectRange, ref dtpFromDate, ref dtpToDate); return(View(visaRepo.FindAll(dtpFromDate, dtpToDate).ToList())); }
// // GET: /ConveyanceInOut/ConveyanceInOut/ public ActionResult Index() { if (searchRepo.ConveyanceSearch == null) { searchRepo.ConveyanceSearch = new ConveyanceSearchInfo(); } int? dtpSelectRange = searchRepo.ConveyanceSearch.dtpSelectRange; DateTime?dtpFromDate = searchRepo.ConveyanceSearch.dtpFromDate; DateTime?dtpToDate = searchRepo.ConveyanceSearch.dtpToDate; ToolbarMenuHelpers.SetToolBar(ViewData, new { New = "Insert", Date = "Index" }, "ConveyanceInOut", null, null, ref dtpSelectRange, ref dtpFromDate, ref dtpToDate); //ไม่ต้องใส่ค่ากลับให้ dtpSelectRange เพราะในนั้นมัน set เป็น 0 searchRepo.ConveyanceSearch.dtpFromDate = dtpFromDate; searchRepo.ConveyanceSearch.dtpToDate = dtpToDate; var searchData = new ConveyanceSearchViewModel(searchRepo.ConveyanceSearch, convInOutRepo.FindAll(searchRepo.ConveyanceSearch).ToList()); return(View(searchData)); }