bug
lu
5 天以前 acf9d7b001514b3586166cbd0609e9d836ada792
DevApp/Gs.DevApp/DevFrm/Work/Frm_WorkProcesses.cs
@@ -8,7 +8,6 @@
using System.Threading.Tasks;
using System.Windows.Forms;
namespace Gs.DevApp.DevFrm
{
    public partial class Frm_WorkProcesses : DevExpress.XtraEditors.XtraForm
@@ -29,14 +28,14 @@
            Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, "", "", (value) =>
            {
                Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0);
            });
            }, tips);
            Gs.DevApp.ToolBox.UtilityHelper.SetTabParameter(gridView1, xtraTabControl1, pageBar1, (value) =>
            {
                getModel(value);
            }, (value) =>
            {
                getPageList(this.pageBar1.CurrentPage);
            });
            }, lbGuid);
            getPageList(1);
            pageBar1.PagerEvent += PageBar1_PagerEvent;
        }
@@ -99,10 +98,10 @@
        private void ToolBarMenu1_btnDelClick1(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_processNo, gridView1,"processNo");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_processNo, gridView1, "processNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?"))
@@ -116,17 +115,19 @@
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                if (_rtn.rtnCode > 0)
                {
                    ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    if (xtraTabControl1.SelectedTabPageIndex == 0)
                    { }
                    else
                        Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 2);
                    getPageList(this.pageBar1.CurrentPage);
                }
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                else
                ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -160,10 +161,10 @@
        private void ToolBarMenu1_btnEdtClick(object sender, EventArgs e)
        {
            string rowGuid = "", rowName = "";
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_processNo, gridView1,"processNo");
            (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_processNo, gridView1, "processNo");
            if (string.IsNullOrEmpty(rowGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 3);
@@ -198,13 +199,13 @@
            toolBarMenu1.isSetBtn = false;
            if (string.IsNullOrEmpty(txt_processNo.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("代码不能为空!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("代码不能为空!");
                txt_processNo.Focus();
                return;
            }
            if (string.IsNullOrEmpty(txt_processName.Text.Trim()))
            {
                Gs.DevApp.ToolBox.MsgHelper.Warning("名称不能为空!");
                Gs.DevApp.ToolBox.MsgHelper.ShowError("名称不能为空!");
                txt_processName.Focus();
                return;
            }
@@ -217,23 +218,27 @@
                isBack = txt_isBack.Checked ? 1 : 0,
                isStatus = txt_isStatus.Checked ? 1 : 0,
                description = txt_description.Text.Trim(),
                isZsm= txt_isZsm.Checked ? 1 : 0,
            };
            try
            {
                string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj));
                ReturnModel<dynamic> _rtn = ToolBox.UtilityHelper.ReturnToDynamic(strJson);
                ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                if (_rtn.rtnCode > 0)
                {
                    ToolBox.MsgHelper.ShowInformation("提示:" + _rtn.rtnMsg);
                    lbGuid.Text = _rtn.rtnData;
                    toolBarMenu1.isSetBtn = true;
                    UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false);
                    toolBarMenu1.currentAction = "";
                    Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 6);
                }
                else
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
@@ -244,7 +249,7 @@
        /// <param name="pageSize">每页几条</param>
        private void getPageList(int curPage)
        {
            var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList);
            var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "a.processNo",
            "asc", "", _sbSqlWhere.ToString());
            var json = JsonConvert.SerializeObject(pgq);
@@ -278,7 +283,7 @@
            }
            catch (Exception ex)
            {
                MsgHelper.Warning("提示:" + ex.Message);
                MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
        /// <summary>
@@ -294,7 +299,7 @@
            if (toolBarMenu1.currentAction == "edit") isEdit = true;
            if (string.IsNullOrEmpty(strGuid))
            {
                ToolBox.MsgHelper.Warning("请先选择你要操作的行!");
                ToolBox.MsgHelper.ShowError("请先选择你要操作的行!");
                return;
            }
            var _obj = new
@@ -312,13 +317,12 @@
                    UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit);
                }
                else
                    ToolBox.MsgHelper.Warning("提示:" + _rtn.rtnMsg);
                    ToolBox.MsgHelper.ShowError("提示:" + _rtn.rtnMsg);
            }
            catch (Exception ex)
            {
                ToolBox.MsgHelper.Warning("提示:" + ex.Message);
                ToolBox.MsgHelper.ShowError("提示:" + ex.Message);
            }
        }
    }
}