啊鑫
5 天以前 650fe9e42e3de66be29769da72cc755273246dd9
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesDbck.cs
@@ -1,17 +1,17 @@
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
using System.Collections.Generic;
using System.Data;
using System.IO;
using System.Threading.Tasks;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
namespace Gs.DevApp.DevFrm
namespace Gs.DevApp.DevFrm.Warehouse
{
    public partial class Frm_MesDbck : DevExpress.XtraEditors.XtraForm
    {
@@ -120,6 +120,9 @@
                                _row["itemId"] = dym.itemId;
                                _row["shNum"] = dym.sl;
                                _row["remark"] = dym.bz;
                                //默认仓库和仓库数量
                                _row["dcCk"] = dym.depotName;
                                _row["dcCkGuid"] = dym.depotId;
                                if (!string.IsNullOrEmpty(_orgId))
                                {
                                    _row["dcOrg"] = _orgName;
@@ -711,9 +714,14 @@
            gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"].ToString());
            gvMx1.SetFocusedRowCellValue("itemId", SelectedDataRow["id"].ToString());
            gvMx1.SetFocusedRowCellValue("itemUnit", SelectedDataRow["dwName"].ToString());
            gvMx1.SetFocusedRowCellValue("dcCk", SelectedDataRow["depotName"]);
            gvMx1.SetFocusedRowCellValue("dcCkGuid", SelectedDataRow["depotId"]);
            gvMx1.CloseEditor();
            gvMx1.PostEditor();
            gvMx1.UpdateCurrentRow();
            gvMx1.BestFitColumns();
        }
        /// <summary>
@@ -796,19 +804,21 @@
                return;
            var dr = gvMx1.GetDataRow(rowhandle);
            var strOrgGuid = dr["dcOrgGuid"].ToString();
            var strItemId = dr["itemId"].ToString();
            if (string.IsNullOrEmpty(strOrgGuid))
            {
                MsgHelper.ShowError("提示:请先选择调出组织!");
                return;
            }
            ;
            SelectCk frm = new SelectCk(strOrgGuid);
            SelectCk frm = new SelectCk(strOrgGuid, strItemId);
            frm.UpdateParent += (ss, ee) =>
            {
                var lst = new List<dynamic>();
                lst = ee.DynamicList;
                gvMx1.SetFocusedRowCellValue("dcCk", lst[0].name);
                gvMx1.SetFocusedRowCellValue("dcCkGuid", lst[0].guid);
                gvMx1.BestFitColumns();
            };
            frm.ShowDialog();
        }
@@ -879,19 +889,21 @@
                return;
            var dr = gvMx1.GetDataRow(rowhandle);
            var strOrgGuid = dr["drOrgGuid"].ToString();
            var strItemId = dr["itemId"].ToString();
            if (string.IsNullOrEmpty(strOrgGuid))
            {
                MsgHelper.ShowError("提示:请先选择调入组织!");
                return;
            }
            ;
            SelectCk frm = new SelectCk(strOrgGuid);
            SelectCk frm = new SelectCk(strOrgGuid, strItemId);
            frm.UpdateParent += (ss, ee) =>
            {
                var lst = new List<dynamic>();
                lst = ee.DynamicList;
                gvMx1.SetFocusedRowCellValue("drCk", lst[0].name);
                gvMx1.SetFocusedRowCellValue("drCkGuid", lst[0].guid);
                gvMx1.BestFitColumns();
            };
            frm.ShowDialog();
        }