public ActionResult NewFeatureMasterContract(string txtFeatureType, string txtMinMaterial, string txtContractNo, string txtItemNo) { string errorMessage = "Failed"; bool success = true; WebView.WebService._base myWebService; myWebService = new WebService._base(); //System.Diagnostics.Debug.WriteLine("DAY :" + txtDay); bool validateData = myWebService.ValidateNewFeatureMastContractMaintenance(txtMinMaterial, txtContractNo, txtItemNo); if (validateData) { WebService._base.FeatureMaintenance newFeatMain = new WebService._base.FeatureMaintenance(); newFeatMain.FEATURE_TYPE = txtFeatureType; newFeatMain.MIN_MATERIAL = txtMinMaterial; newFeatMain.CONTRACT_NO = txtContractNo; newFeatMain.ITEM_NO = txtItemNo; success = myWebService.AddFeatureMastContractMaintenance(newFeatMain); } else { success = false; errorMessage = "Contract No and Item No existed."; } return(Json(new { errorMessage = errorMessage, Success = success }, JsonRequestBehavior.AllowGet)); }