public async Task <ActionResult> SaveModify(WorkOrderControlObjectViewModel model)
        {
            using (WorkOrderControlObjectServiceClient client = new WorkOrderControlObjectServiceClient())
            {
                WorkOrderControlObjectKey key = new WorkOrderControlObjectKey()
                {
                    MaterialCode = model.MaterialCode,
                    OrderNumber  = model.OrderNumber,
                    Type         = model.Type,
                    Object       = model.Object
                };
                MethodReturnResult <WorkOrderControlObject> result = await client.GetAsync(key);

                if (result.Code == 0)
                {
                    result.Data.Value    = model.Value;
                    result.Data.IsUsed   = model.IsUsed;
                    result.Data.Editor   = User.Identity.Name;
                    result.Data.EditTime = DateTime.Now;
                    MethodReturnResult rst = await client.ModifyAsync(result.Data);

                    if (rst.Code == 0)
                    {
                        rst.Message = string.Format(ZPVMResources.StringResource.WorkOrderControlObject_SaveModify_Success
                                                    , key);
                    }
                    return(Json(rst));
                }
                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()));
        }