/// <summary> /// 显示模具位置 /// </summary> private void ShowMoldPosition() { ConditionServiceClient conditionclient = new ConditionServiceClient(); BasicMessage bmsg = new BasicMessage(); if (!conditionclient.MoldExist(MoldNRTB.Text)) { bmsg.Result = false; MoldPosiNRTB.Text = string.Empty; } if (bmsg.Result == false) { return; } MoldPartInfoServiceClient moldpartClient = new MoldPartInfoServiceClient(); MoldPosiNRTB.Text = moldpartClient.GetMoldPositionByNr(MoldNRTB.Text).PositionNR; }
/// <summary> /// 按钮点击事件-模具归还 /// </summary> /// <param name="sender">事件源</param> /// <param name="e">事件参数</param> private void ReturnMoldBtn_Click(object sender, RoutedEventArgs e) { if (!string.IsNullOrWhiteSpace(MoldNRTB.Text) && !string.IsNullOrWhiteSpace(ApplicantNRTB.Text)) { ConditionServiceClient conditionclient = new ConditionServiceClient(); BasicMessage bmsg = new BasicMessage(); if (!conditionclient.MoldExist(MoldNRTB.Text)) { bmsg.Result = false; bmsg.MsgContent.Add("模具"); } if (ApplicantNRTB.Text.Length != 0 && !conditionclient.EmpExist(ApplicantNRTB.Text)) { bmsg.Result = false; bmsg.MsgContent.Add("退料员工"); } if (bmsg.Result == false) { MessageBox.Show(bmsg.MsgText + " 不存在,请重新输入"); return; } StorageManageServiceClient client = new StorageManageServiceClient(); Message msg = client.ReturnMold(MoldNRTB.Text, ApplicantNRTB.Text, "", RemarkTB.Text, (MoldReturnStateType)int.Parse(MoldSateCB.SelectedValue.ToString())); MessageBox.Show(msg.Content); if (msg.MsgType == MsgType.OK) { MoldPosiSP.Visibility = Visibility.Visible; MoldPartInfoServiceClient moldpartClient = new MoldPartInfoServiceClient(); MoldPosiNRTB.Text = moldpartClient.GetMoldPositionByNr(MoldNRTB.Text).PositionNR; MoldInStoreBtn.IsEnabled = true; } } else { MessageBox.Show("请将 模具号,退料员工号 填写完整"); } }