| | |
| | | public void Initialize(string param) |
| | | { |
| | | // 使用param进行初始化工作 |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1,0); |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | | getModel(param); |
| | | } |
| | | |
| | |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | } |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage) |
| | | { |
| | | gcMain1.DataSource = null;var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | gcMain1.DataSource = null; var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | PageQueryModel pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "create_date", "asc", "", _sbSqlWhere.ToString()); |
| | | string json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | |
| | | { |
| | | ToolBox.MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | |
| | | } |
| | | private void getModel(string strGuid) |
| | | { |
| | |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolCk(int _inFieldValue) |
| | | { |
| | | //toolBarMenu1.guidKey = ""; |
| | | //string rowGuid, rowName; |
| | | //(rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | // lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | //toolBarMenu1.guidKey = rowGuid; |
| | | //if (string.IsNullOrEmpty(rowGuid)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | //if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定操作吗?")) |
| | | // return; |
| | | //var frm = new MesQcExceptionalShow(rowGuid); |
| | | //frm.UpdateParent += (s, e) => |
| | | //{ |
| | | // int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | // gridView1.FocusedRowHandle = rowHandle; |
| | | // UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | //}; |
| | | //frm.ShowDialog(); |
| | | string strMsg = ""; |
| | | switch (_inFieldValue) |
| | | { |
| | | case 1: |
| | | strMsg = "审核"; |
| | | break; |
| | | case 0: |
| | | strMsg = "反审核"; |
| | | break; |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, lbGuid, txt_fBillNo, gridView1, "fBillNo"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定操作吗?")) |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定" + strMsg + "吗?")) |
| | | return; |
| | | var frm = new MesQcExceptionalShow(rowGuid); |
| | | frm.UpdateParent += (s, e) => |
| | | var _obj = new |
| | | { |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkBy", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | guid = rowGuid, |
| | | inFieldValue = _inFieldValue, |
| | | }; |
| | | frm.ShowDialog(); |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "EditModelSubmit", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | MsgHelper.Warning(_rtn.rtnData.outMsg.ToString()); |
| | | if (_rtn.rtnCode > 0 && _rtn.rtnData.outSum * 1 > 0) |
| | | { |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | { |
| | | getModel(lbGuid.Text.Trim()); |
| | | } |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | UtilityHelper.SetCheckIco(gridView1, "chkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |