| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Windows.Forms;
- using Core.Mes.Client.Comm.Format;
- using Core.Mes.Client.Comm.Tool;
- using CoreFS.CA06;
- namespace Core.StlMes.Client.LgResMgt.库存位置
- {
- public partial class UpdateMemo : FrmBase
- {
- private List<MatInfo> _matInfo;
- public UpdateMemo(OpeBase _ob, List<MatInfo> matInfo)
- {
- InitializeComponent();
- this.ob = _ob;
- _matInfo = EntityHelper.CopyEntitys<MatInfo>(matInfo);
- editNum.Value = _matInfo.Select(p=>p.ActCount).Sum();
- editNum.MaxValue = editNum.Value;
- uteMemo.Text = _matInfo[0].Memo;
- editNum.ReadOnly = matInfo.Count > 1;
- }
- private void ubtOK_Click(object sender, EventArgs e)
- {
- if (editNum.Value == null)
- {
- MessageBox.Show("请输入需要修改的支数");
- return;
- }
- if (_matInfo.Count == 1)
- {
- _matInfo[0].ActCount = decimal.Parse(editNum.Value.ToString3());
- }
- var ccp = new CoreClientParam
- {
- ServerName = "Core.LgMes.Server.LgDeviceManager.StorageManage",
- MethodName = "UpdateMemo",
- ServerParams = new object[]
- {
- _matInfo.Select(JSONFormat.Format).ToList(),
- uteMemo.Text
- }
- };
- ccp = ExecuteNonQuery(ccp, CoreInvokeType.Internal);
- MessageUtil.ShowTips(ccp.ReturnInfo);
- if (ccp.ReturnInfo.ToString2().Contains("成功"))
- {
- this.DialogResult = DialogResult.OK;
- }
- }
- private void uteProjectName_KeyPress(object sender, KeyPressEventArgs e)
- {
- if (e.KeyChar == 13)
- {
- ubtOK_Click(null, null);
- }
- }
- }
- }
|