public ActionResult Edit(MSTS03P002Model model) { var da = new MSTS03P002DA(); SetStandardErrorLog(da.DTO); da.DTO.Execute.ExecuteType = MSTS03P002ExecuteType.GetByID; TempModel.PIT_ID = da.DTO.Model.PIT_ID = model.PIT_ID; SetStandardField(da.DTO.Model); da.SelectNoEF(da.DTO); localModel = da.DTO.Model; if (localModel.IS_USED) { RemoveStandardButton("SaveModify"); } else { SetDefaulButton(StandardButtonMode.Modify); } SetDefaultData(StandardActionName.Edit); //set ค่า DDL return(View(StandardActionName.Edit, localModel)); }
public ActionResult Search(MSTS03P002Model model) { var da = new MSTS03P002DA(); SetStandardErrorLog(da.DTO); da.DTO.Execute.ExecuteType = MSTS03P002ExecuteType.GetAll; if (Request.GetRequest("page").IsNullOrEmpty()) { model.IsDefaultSearch = true; TempSearch = model; } da.DTO.Model = TempSearch; da.SelectNoEF(da.DTO); return(JsonAllowGet(da.DTO.Models, da.DTO.Result)); }