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)); }