public ActionResult DeleteDetail(List <MISS02P001Model> data) { var da = new MISS02P001DA(); SetStandardErrorLog(da.DTO); // da.DTO.Execute.ExecuteType = MISS02P001ExecuteType.DeleteDetail; da.DTO.Model.COM_CODE = TempModel.COM_CODE; da.DTO.Model.YEAR = TempModel.YEAR; da.DTO.Models = (List <MISS02P001Model>)data; da.DeleteNoEF(da.DTO); return(JsonAllowGet(da.DTO.Model.Details)); }
//----------------------------------------------// private DTOResult SaveData(string mode, object model) { var da = new MISS02P001DA(); //Session[SessionSystemName.SYS_APPS] = TempModel.APP_CODE; ////ในกรณีที่มีการ SaveLog ให้ Include SetStandardLog ด้วย //SetStandardLog( // da.DTO, // model, // GetSaveLogConfig("dbo", "VSMS_DEPLOY", "COM_CODE", "YEAR")); if (mode == StandardActionName.SaveCreate) { SetStandardField(model); da.DTO.Model = (MISS02P001Model)model; da.DTO.Execute.ExecuteType = MISS02P001ExecuteType.Insert; da.InsertNoEF(da.DTO); } else if (mode == StandardActionName.SaveModify) { SetStandardField(model); da.DTO.Execute.ExecuteType = MISS02P001ExecuteType.Update; da.DTO.Model = (MISS02P001Model)model; da.UpdateNoEF(da.DTO); } else if (mode == StandardActionName.Delete) { da.DTO.Models = (List <MISS02P001Model>)model; da.DeleteNoEF(da.DTO); } else if (mode == "Upload") { da.DTO.Execute.ExecuteType = MISS02P001ExecuteType.CallSPInsertExcel; SetStandardField(model); da.DTO.Model = (MISS02P001Model)model; da.DTO.Model.COM_CODE = SessionHelper.SYS_COM_CODE; da.InsertNoEF(da.DTO); if (da.DTO.Result.IsResult) { da.DTO.Execute.ExecuteType = MISS02P001ExecuteType.ValidateExl; da.UpdateNoEF(da.DTO); } } return(da.DTO.Result); }