public ActionResult MachineStatus() { var flowScannerLogic = new FlowScannerLogic(); var model = flowScannerLogic.GetStatus(); return(PartialView("MachineStatus", model)); }
public ActionResult StartBatch(LoadingModels.IndexPostModel model) { if (ModelState.IsValid) { try { #warning Starting a batch must be transactional transactionLogic.StartTransaction(model.SelectedTransaction, model.SelectedMaterialType, User.Identity.Name); var flowScannerLogic = new FlowScannerLogic(); var machineStatus = flowScannerLogic.GetStatus(); if (machineStatus == Mantex.ERP.Entities.MachineStatusEnum.Working) { flowScannerLogic.StartMeasure(model.SelectedTransaction, model.SelectedMaterialType); } } catch (Exception ex) { ModelState.AddModelError("", ex.Message); } } return(RedirectToAction("Index")); }