public ActionResult Edit(MSTS03P001Model model) { var da = new MSTS03P001DA(); SetStandardErrorLog(da.DTO); da.DTO.Execute.ExecuteType = MSTS03P001ExecuteType.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(MSTS03P001Model model) { var da = new MSTS03P001DA(); SetStandardErrorLog(da.DTO); da.DTO.Execute.ExecuteType = MSTS03P001ExecuteType.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)); }