啊鑫
2024-10-25 2d50e595247e2a34ba88972bfd37a30456b692ca
DevApp/Gs.DevApp/DevFrm/Warehouse/Frm_MesInvItemArn.cs
@@ -28,6 +28,8 @@
            this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick1;
            this.toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            this.toolBarMenu1.btnJianYanClick += ToolBarMenu1_btnJianYanClick;
            this.toolBarMenu1.btnFjianYanClick += ToolBarMenu1_btnFjianYanClick;
            gcMain.MouseDoubleClick += GcMain_MouseDoubleClick;
            getPageList(1, UtilityHelper.GetPageSize());
            pageBar1.PagerEvent += PageBar1_PagerEvent;
@@ -48,7 +50,7 @@
            ucLookSupplier1.EditChanged += (s, e) =>
            {
                var ddd = this.ucLookSupplier1.GetValue();
                lbSupplierName.Text = ddd[1];
              //  lbSupplierName.Text = ddd[1];
            };
            btnSelect.Click += (s, e) =>
            {
@@ -69,9 +71,41 @@
            ucLookCk1.EditChanged += (s, e) =>
            {
                var ddd = this.ucLookCk1.GetValue();
                lbCkName.Text = ddd[1];
                //lbCkName.Text = ddd[1];
            };
        }
        private void ToolBarMenu1_btnFjianYanClick1(object sender, EventArgs e)
        {
            throw new NotImplementedException();
        }
        /// <summary>
        /// 反检验
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnFjianYanClick(object sender, EventArgs e)
        {
            this.toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
            this.toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
        /// 检验
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnJianYanClick(object sender, EventArgs e)
        {
            this.toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
            this.toolBarMenu1.guidKey = rowGuid;
        }
        /// <summary>
@@ -134,7 +168,7 @@
        private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_billNo, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
@@ -254,7 +288,7 @@
                    {
                        Guid = _guid,
                        AboutGuid = Guid.Parse(row["aboutGuid"].ToString()),
                        ItemNo= row["itemNo"].ToString(),
                        ItemNo = row["itemNo"].ToString(),
                        //ItemId= int.Parse( row["itemId"].ToString()),
                        Quantity = decimal.Parse(row["quantity"].ToString()),
                    });
@@ -361,5 +395,36 @@
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
            }
        }
        private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e)
        {
            int rowhandle = gvMx1.FocusedRowHandle;
            if (rowhandle < 0)
                return;
            if (e.Button.Index == 0)
            {
                DataRow dr = gvMx1.GetDataRow(rowhandle);
                string mxGuid = dr["guid"].ToString();
                if (!MsgHelper.AskQuestion("你选择了1条数据,确定删除吗?"))
                    return;
                string strJson = "";
                List<string> lst = new List<string>();
                lst.Add(mxGuid);
                try
                {
                    strJson = UtilityHelper.HttpPost("", _webServiceName + "DeleteModelMx", JsonConvert.SerializeObject(lst));
                    ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                    if (_rtn.rtnCode > 0)
                    {
                        getModel(lbGuid.Text, true, 1);
                    }
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                }
                catch (Exception ex)
                {
                    ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                }
            }
        }
    }
}