public ActionResult NewMaterialMastMaintenance(MaterialMastMaintenanceModel m) { bool success = true; WebView.WebService._base myWebService; myWebService = new WebService._base(); bool selected = false; WebService._base.MaterialMasterMaintenance newMatMastM = new WebService._base.MaterialMasterMaintenance(); System.Diagnostics.Debug.WriteLine("base :2 Mat Name [" + newMatMastM.MAT_NAME + "] Mat UOM [" + newMatMastM.MAT_UOM + "] Mat Price [" + newMatMastM.MAT_PRICE + "] Mat Cat [" + newMatMastM.MAT_CAT + "] Record Type [" + newMatMastM.RECORD_TYPE + "] Tras Type [" + newMatMastM.TRANS_TYPE + "] "); newMatMastM.MAT_NAME = m.MatName; newMatMastM.MAT_UOM = m.MatUOM; newMatMastM.MAT_PRICE = m.MatPrice.ToString(); newMatMastM.MAT_CAT = m.MatCat; newMatMastM.RECORD_TYPE = m.RecordType; newMatMastM.TRANS_TYPE = m.TransType; success = myWebService.AddMatMastMaintenance(newMatMastM); selected = true; //if (ModelState.IsValid && selected) //{ if (success == true) { return(RedirectToAction("NewSave")); } else { return(RedirectToAction("NewSaveFail")); // store to db failed. } //} //return View(m); }