public ActionResult NewInstallMaintenance(InstallMaintenanceModel m)
        {
            bool success = true;

            WebView.WebService._base myWebService;
            myWebService = new WebService._base();

            bool selected = false;

            WebService._base.InstallMaintenance newInstM = new WebService._base.InstallMaintenance();

            newInstM.INST_CODE      = Convert.ToString(m.InstallCode);
            newInstM.INST_NAME      = m.InstallName;
            newInstM.SUP_NORM_RATE  = Convert.ToString(m.SUPNormRate);
            newInstM.SUP_RWO_RATE   = Convert.ToString(m.SUPRWORate);
            newInstM.IMPL_NORM_RATE = Convert.ToString(m.IMPLNormalRate);
            newInstM.IMPL_RWO_RATE  = Convert.ToString(m.IMPLRWORate);
            newInstM.INST_TYPE      = m.InstallType;
            newInstM.RANK           = m.Rank;


            success  = myWebService.AddInstMaintenance(newInstM);
            selected = true;

            if (ModelState.IsValid && selected)
            {
                if (success == true)
                {
                    return(RedirectToAction("NewSave"));
                }
                else
                {
                    return(RedirectToAction("NewSaveFail")); // store to db failed.
                }
            }

            return(View(m));
        }
        public ActionResult UpdateData(string codeVal, string txtCode, string txtName, string txtsupNorm, string txtsupRwo, string txtimplNorm, string txtimplRwo, string txtType, string txtRank)
        {
            bool success = true;

            WebView.WebService._base myWebService;
            myWebService = new WebService._base();

            WebService._base.InstallMaintenance newCode = new WebService._base.InstallMaintenance();
            newCode.INST_CODE      = txtCode;
            newCode.INST_NAME      = txtName;
            newCode.SUP_NORM_RATE  = txtsupNorm;
            newCode.SUP_RWO_RATE   = txtsupRwo;
            newCode.IMPL_NORM_RATE = txtimplNorm;
            newCode.IMPL_RWO_RATE  = txtimplRwo;
            newCode.INST_TYPE      = txtType;
            newCode.RANK           = txtRank;
            success = myWebService.UpdateInstMaintenance(newCode, codeVal);

            return(Json(new
            {
                Success = success
            }, JsonRequestBehavior.AllowGet));
        }