コード例 #1
0
        public ActionResult GrindingDone(Batch batch)
        {
            ResponseMsg response = new ResponseMsg();
            var         bom      = BillOfMaterialLogic.GetLastRevision(batch.ProductID, batch.ShadeID);

            if (bom == null)
            {
                response.IsSuccess     = false;
                response.ResponseValue = "Bill of material for selected product and shade is not found, Please enter Bill of material detail for selected Product and Batch";
                return(Json(response));
            }
            if (GrindingLogic.Done(batch))
            {
                response.IsSuccess = true;
            }
            return(Json(response));
        }
コード例 #2
0
        public JsonResult StartGrinding(int ID, int ProductID, int ShadeID, int EmployeeID)
        {
            ResponseMsg response = new ResponseMsg();
            var         bom      = BillOfMaterialLogic.GetLastRevision(ProductID, ShadeID);

            if (bom == null)
            {
                response.IsSuccess     = false;
                response.ResponseValue = "Bill of material for selected product and shade is not found, Please enter Bill of material detail for selected Product and Batch";
                return(Json(response, JsonRequestBehavior.AllowGet));
            }
            var materials = GrindingLogic.Start(ID, EmployeeID);

            if (materials != null && materials.Count() > 0)
            {
                var fileName = GrindingLogic.PrintRawMaterial(materials, Server.MapPath(ConfigurationManager.AppSettings["ReportFolderPath"]), ID, currUser.Name, EmployeeID);
                if (!string.IsNullOrEmpty(fileName))
                {
                    response.IsSuccess     = true;
                    response.ResponseValue = ConfigurationManager.AppSettings["ReportFolderPath"].Replace("~", "").Trim() + fileName;
                }
            }
            return(Json(response, JsonRequestBehavior.AllowGet));
        }
コード例 #3
0
 public ActionResult Grinding()
 {
     ViewBag.Employees = EmployeeLogic.GetEmployeeByID(0).Where(x => x.ID != currUser.ID);
     return(View(GrindingLogic.GetGrindingBatches(0)));
 }