Пример #1
0
        public ActionResult UpdateData_PlanUnit(string txtPU_ID1, string txtPU_DESC, string txtPU_INST_PR, string txtPU_MAT_PR, string txtPU_UOM, string txtDURATION, string txtNETWORK_FLAG, string txtACT_CODE, string txtSUP_DURATION, string txtPUBillRate)
        {
            bool success = true;

            WebView.WebService._base myWebService;
            myWebService = new WebService._base();
            System.Diagnostics.Debug.WriteLine("txtPU_ID AKU :" + txtPU_DESC);
            WebService._base.PlanUnit planUnitnewjob = new WebService._base.PlanUnit();
            planUnitnewjob.PU_ID           = txtPU_ID1;
            planUnitnewjob.PU_DESC         = txtPU_DESC;
            planUnitnewjob.PU_INST_PR      = txtPU_INST_PR;
            planUnitnewjob.PU_MAT_PR       = txtPU_MAT_PR;
            planUnitnewjob.PU_UOM          = txtPU_UOM;
            planUnitnewjob.PU_DURATION     = txtDURATION;
            planUnitnewjob.PU_NETWORK_FLAG = txtNETWORK_FLAG;
            planUnitnewjob.PU_ACT_CODE     = txtACT_CODE;
            planUnitnewjob.PU_SUP_DURATION = txtSUP_DURATION;
            planUnitnewjob.PU_BILL_RATE    = txtPUBillRate;
            success = myWebService.UpdatePlanUnit(planUnitnewjob, txtPU_ID1, txtPUBillRate);

            return(Json(new
            {
                Success = success
            }, JsonRequestBehavior.AllowGet));
        }
Пример #2
0
        public ActionResult PlanUnit_NewJob(PlanUnit_NewJobModel m)
        {
            bool success = true;

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

            bool selected = false;

            WebService._base.PlanUnit PlanUnitNewjob = new WebService._base.PlanUnit();
            PlanUnitNewjob.PU_ID      = m.x_PU_ID;
            PlanUnitNewjob.PU_DESC    = m.x_PU_DESC;
            PlanUnitNewjob.PU_INST_PR = m.x_PU_INST_PR.ToString();
            PlanUnitNewjob.PU_MAT_PR  = m.x_PU_MAT_PR.ToString();
            System.Diagnostics.Debug.WriteLine("Master {} :" + m.x_PU_UOM.ToString());
            PlanUnitNewjob.PU_UOM          = m.x_PU_UOM;
            PlanUnitNewjob.PU_DURATION     = m.x_PU_DURATION.ToString();
            PlanUnitNewjob.PU_NETWORK_FLAG = m.x_PU_NETWORK_FLAG;
            PlanUnitNewjob.PU_ACT_CODE     = m.x_PU_ACT_CODE;
            PlanUnitNewjob.PU_SUP_DURATION = m.x_PU_SUP_DURATION.ToString();
            PlanUnitNewjob.PU_BILL_RATE    = m.x_PU_BILL_RATE;
            success = myWebService.AddPlanUnit(PlanUnitNewjob);

            selected = true;

            if (success == true)
            {
                return(RedirectToAction("PlanUnit_NewSave"));
            }
            else
            {
                return(RedirectToAction("NewSaveFail"));    // store to db failed.
            }
            //return View(m);
        }