public ActionResult PURM_NewJob(PURM_NewJobModel model) { bool success = true; WebView.WebService._base myWebService; myWebService = new WebService._base(); bool selected = false; // create job in OSP (SOAP) WebService._base.PURM PURM_newjob = new WebService._base.PURM(); PURM_newjob.PU_ID = model.x_PU_ID; PURM_newjob.PU_DESC = model.x_PU_DESC; PURM_newjob.INST_CODE = model.x_INST_CODE; PURM_newjob.INST_NAME = model.x_INST_NAME; PURM_newjob.CTRT_SUP_QTY = model.x_CTRT_SUP_QTY; PURM_newjob.SUB_LAB_QTY = model.x_SUB_LAB_QTY; PURM_newjob.IMPL_LAB_QTY = model.x_IMPL_LAB_QTY; PURM_newjob.DUR_SPVR = model.x_DUR_SPVR; PURM_newjob.DUR_IMPL = model.x_DUR_IMPL; success = myWebService.AddPURM(PURM_newjob); selected = true; if (ModelState.IsValid && selected) { if (success == true) { return(RedirectToAction("PURM_NewSave")); } else { return(RedirectToAction("NewSaveFail")); // store to db failed. } } return(View(model)); }
public ActionResult UpdateData_PURM(string txtPU_ID, string txtPU_DESC, string txtINST_CODE, string txtINST_NAME, string txtCTRT_SUP_QTY, string txtSUB_LAB_QTY, string txtIMPL_LAB_QTY, string txtDUR_SPVR, string txtDUR_IMPL) { bool success = true; WebView.WebService._base myWebService; myWebService = new WebService._base(); WebService._base.PURM PURM_newjob = new WebService._base.PURM(); PURM_newjob.PU_ID = txtPU_ID; PURM_newjob.PU_DESC = txtPU_DESC; PURM_newjob.INST_CODE = txtINST_CODE; PURM_newjob.INST_NAME = txtINST_NAME; PURM_newjob.CTRT_SUP_QTY = txtCTRT_SUP_QTY; PURM_newjob.SUB_LAB_QTY = txtSUB_LAB_QTY; PURM_newjob.IMPL_LAB_QTY = txtIMPL_LAB_QTY; PURM_newjob.DUR_SPVR = txtDUR_SPVR; PURM_newjob.DUR_IMPL = txtDUR_IMPL; success = myWebService.UpdatePURM(PURM_newjob, txtPU_ID); return(Json(new { Success = success }, JsonRequestBehavior.AllowGet)); }