// // GET: /ZPVM/RuleControlObject/Detail public async Task <ActionResult> Detail(string code, EnumPVMTestDataType obj, string type) { using (RuleControlObjectServiceClient client = new RuleControlObjectServiceClient()) { RuleControlObjectKey key = new RuleControlObjectKey() { Code = code, Object = obj, Type = type }; MethodReturnResult <RuleControlObject> result = await client.GetAsync(key); if (result.Code == 0) { RuleControlObjectViewModel viewModel = new RuleControlObjectViewModel() { Code = result.Data.Key.Code, Value = result.Data.Value, Type = result.Data.Key.Type, Object = result.Data.Key.Object, IsUsed = result.Data.IsUsed, CreateTime = result.Data.CreateTime, Creator = result.Data.Creator, Editor = result.Data.Editor, EditTime = result.Data.EditTime }; return(PartialView("_InfoPartial", viewModel)); } else { ModelState.AddModelError("", result.Message); } } return(PartialView("_InfoPartial")); }
// // GET: /ZPVM/Decay/Detail public async Task <ActionResult> Detail(string code, EnumPVMTestDataType obj) { using (DecayServiceClient client = new DecayServiceClient()) { DecayKey key = new DecayKey() { Code = code, Object = obj }; MethodReturnResult <Decay> result = await client.GetAsync(key); if (result.Code == 0) { DecayViewModel viewModel = new DecayViewModel() { Description = result.Data.Description, IsUsed = result.Data.IsUsed, Object = result.Data.Key.Object, Type = result.Data.Type, Value = result.Data.Value, Code = result.Data.Key.Code, CreateTime = result.Data.CreateTime, Creator = result.Data.Creator, Editor = result.Data.Editor, EditTime = result.Data.EditTime }; return(PartialView("_InfoPartial", viewModel)); } else { ModelState.AddModelError("", result.Message); } } return(PartialView("_InfoPartial")); }
public async Task <ActionResult> Delete(string code, EnumPVMTestDataType obj) { MethodReturnResult result = new MethodReturnResult(); DecayKey key = new DecayKey() { Code = code, Object = obj }; using (DecayServiceClient client = new DecayServiceClient()) { result = await client.DeleteAsync(key); if (result.Code == 0) { result.Message = string.Format(ZPVMResources.StringResource.Decay_Delete_Success , key); } return(Json(result)); } }
public async Task <ActionResult> Delete(string code, EnumPVMTestDataType obj, string type) { MethodReturnResult result = new MethodReturnResult(); RuleControlObjectKey key = new RuleControlObjectKey() { Code = code, Object = obj, Type = type }; using (RuleControlObjectServiceClient client = new RuleControlObjectServiceClient()) { result = await client.DeleteAsync(key); if (result.Code == 0) { result.Message = string.Format(ZPVMResources.StringResource.RuleControlObject_Delete_Success , key); } return(Json(result)); } }
public async Task <ActionResult> Delete(string OrderNumber, string MaterialCode, EnumPVMTestDataType obj, string type) { MethodReturnResult result = new MethodReturnResult(); WorkOrderControlObjectKey key = new WorkOrderControlObjectKey() { MaterialCode = MaterialCode, OrderNumber = OrderNumber, Object = obj, Type = type }; using (WorkOrderControlObjectServiceClient client = new WorkOrderControlObjectServiceClient()) { result = await client.DeleteAsync(key); if (result.Code == 0) { result.Message = string.Format(ZPVMResources.StringResource.WorkOrderControlObject_Delete_Success , key); } return(Json(result)); } }
// // GET: /ZPVM/WorkOrderControlObject/Modify public async Task <ActionResult> Modify(string OrderNumber, string MaterialCode, EnumPVMTestDataType obj, string type) { WorkOrderControlObjectViewModel viewModel = new WorkOrderControlObjectViewModel(); using (WorkOrderControlObjectServiceClient client = new WorkOrderControlObjectServiceClient()) { MethodReturnResult <WorkOrderControlObject> result = await client.GetAsync(new WorkOrderControlObjectKey() { MaterialCode = MaterialCode, OrderNumber = OrderNumber, Object = obj, Type = type }); if (result.Code == 0) { viewModel = new WorkOrderControlObjectViewModel() { MaterialCode = result.Data.Key.MaterialCode, OrderNumber = result.Data.Key.OrderNumber, Value = result.Data.Value, Type = result.Data.Key.Type, Object = result.Data.Key.Object, IsUsed = result.Data.IsUsed, CreateTime = result.Data.CreateTime, Creator = result.Data.Creator, Editor = result.Data.Editor, EditTime = result.Data.EditTime }; return(PartialView("_ModifyPartial", viewModel)); } else { ModelState.AddModelError("", result.Message); } } return(PartialView("_ModifyPartial", new WorkOrderControlObjectViewModel())); }
public async Task <ActionResult> Delete(string ProductCode, string CellEff, string SupplierCode, EnumPVMTestDataType obj, string type) { MethodReturnResult result = new MethodReturnResult(); ProductControlObjectKey key = new ProductControlObjectKey() { ProductCode = ProductCode, CellEff = CellEff, SupplierCode = SupplierCode, Object = obj, Type = type }; using (ProductControlObjectServiceClient client = new ProductControlObjectServiceClient()) { result = await client.DeleteAsync(key); if (result.Code == 0) { result.Message = string.Format(ZPVMResources.StringResource.ProductControlObject_Delete_Success , key); } return(Json(result)); } }
// // GET: /ZPVM/ProductControlObject/Modify public async Task <ActionResult> Modify(string ProductCode, string CellEff, string SupplierCode, EnumPVMTestDataType obj, string type) { ProductControlObjectViewModel viewModel = new ProductControlObjectViewModel(); using (ProductControlObjectServiceClient client = new ProductControlObjectServiceClient()) { MethodReturnResult <ProductControlObject> result = await client.GetAsync(new ProductControlObjectKey() { ProductCode = ProductCode, CellEff = CellEff, SupplierCode = SupplierCode, Object = obj, Type = type }); if (result.Code == 0) { viewModel = new ProductControlObjectViewModel() { ProductCode = result.Data.Key.ProductCode, CellEff = result.Data.Key.CellEff, SupplierCode = result.Data.Key.SupplierCode, ProductName = result.Data.ProductName, SupplierName = result.Data.SupplierName, Value = result.Data.Value, Type = result.Data.Key.Type, Object = result.Data.Key.Object, IsUsed = result.Data.IsUsed, CreateTime = result.Data.CreateTime, Creator = result.Data.Creator, Editor = result.Data.Editor, EditTime = result.Data.EditTime }; return(PartialView("_ModifyPartial", viewModel)); } else { ModelState.AddModelError("", result.Message); } } return(PartialView("_ModifyPartial", new ProductControlObjectViewModel())); }