1
lu
2024-11-27 29d1395e49636e6db2f96c92bbb30a280cf8078e
DevApp/Gs.DevApp/DevFrm/WOM/Frm_Womcaa.cs
@@ -1,5 +1,6 @@
using Gs.DevApp.Entity;
using Gs.DevApp.ToolBox;
using Gs.DevApp.UserControl;
using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using System;
@@ -17,6 +18,7 @@
        public Frm_Womcaa()
        {
            InitializeComponent();
            toolBarMenu1.btnEdtClick += ToolBarMenu1_btnEdtClick;
            this.toolBarMenu1.btnLoadClick += ToolBarMenu1_btnLoadClick;
            this.toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick;
            this.toolBarMenu1.btnJieAnClick += ToolBarMenu1_btnJieAnClick;
@@ -38,6 +40,7 @@
                Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5);
                e.Graphics.DrawString(str, f, Brushes.Gray, r);
            };
            txt_caa021.KeyFile = "workid";
        }
@@ -97,26 +100,31 @@
                getPageList(1, UtilityHelper.GetPageSize());
        }
        /// <summary>
        /// 反结案
        ///     修改事件
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnFjieAnClick(object sender, EventArgs e)
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid, rowName;
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_caa001, gridView1, 2);
                lbGuid, txt_caa001, gridView1);
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName +
                                       "】,确定反结案吗?"))
                return;
            getModel(rowGuid, true, 1);
        }
        /// <summary>
        /// 反结案
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private async void ToolBarMenu1_btnFjieAnClick(object sender, EventArgs e)
        {
        }
        /// <summary>
        /// 结案
@@ -124,20 +132,45 @@
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <exception cref="NotImplementedException"></exception>
        private void ToolBarMenu1_btnJieAnClick(object sender, EventArgs e)
        private async void ToolBarMenu1_btnJieAnClick(object sender, EventArgs e)
        {
            toolBarMenu1.guidKey = "";
            string rowGuid, rowName;
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1,
                lbGuid, txt_caa001, gridView1, 2);
                lbGuid, txt_caa001, gridView1);
            toolBarMenu1.guidKey = rowGuid;
            if (string.IsNullOrEmpty(rowGuid))
            {
                MsgHelper.Warning("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName +
                                       "】,确定结案吗?"))
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定提交检验吗?"))
                return;
            UcLoading _loading = new UcLoading();
            var _obj = new
            {
                guid = rowGuid,
            };
            try
            {
                var strJson = await UtilityHelper.HttpPostAsync("",
                    _webServiceName + "EditModelSubmit",
                    JsonConvert.SerializeObject(_obj));
                var _rtn = UtilityHelper.ReturnToDynamic(strJson);
                MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg);
                if (_rtn.rtnCode > 0)
                {
                    if (xtraTabControl1.SelectedTabPageIndex == 1)
                        getModel(lbGuid.Text.Trim(), false, 999);
                    else
                        getPageList(1, UtilityHelper.GetPageSize());
                }
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
            }
            _loading.Stop();
        }
        /// <summary>