| | |
| | | public Frm_Womdaa() |
| | | { |
| | | InitializeComponent(); |
| | | |
| | | //加入checkbox begin |
| | | this.gvMx2.CustomDrawColumnHeader += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomDrawColumnHeader(s, e); }; |
| | | this.gvMx2.MouseUp += (s, e) => { Gs.DevApp.ToolBox.UtilityHelper.CustomMouseUp(s, e, gcMx2, gvMx2); }; |
| | | this.colChkInt.OptionsColumn.AllowSort = DevExpress.Utils.DefaultBoolean.False; |
| | | this.colChkInt.OptionsFilter.AllowAutoFilter = false; |
| | | this.colChkInt.OptionsFilter.AllowFilter = false; |
| | | this.colChkInt.OptionsFilter.AllowInHeaderSearch = DevExpress.Utils.DefaultBoolean.False; |
| | | //加入checkbox end |
| | | |
| | | this.splitMx99.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2; |
| | | this.splitMx98.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2; |
| | | this.splitMx100.PanelVisibility = DevExpress.XtraEditors.SplitPanelVisibility.Panel2; |
| | |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | this.toolBarMenu1.btnShouJianClick += ToolBarMenu1_btnShouJianClick; |
| | | this.toolBarMenu1.btnDelClick += ToolBarMenu1_btnDelClick; |
| | | this.toolBarMenu1.btnChbgClick += ToolBarMenu1_btnChbgClick; |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | |
| | | { |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 撤回报工事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnChbgClick(object sender, EventArgs e) |
| | | { |
| | | _toolChbg(1); |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 查询事件 |
| | | /// </summary> |
| | |
| | | lbGuid.Text = strGuid; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | // gvList.Add(gvMx2); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | |
| | | + "}"; |
| | | } |
| | | |
| | | /// <summary> |
| | | /// |
| | | /// </summary> |
| | | /// <param name="inFieldValue"></param> |
| | | private void _toolChbg(int _inFieldValue) |
| | | { |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_daa001, gridView1, "daa001"); |
| | | toolBarMenu1.guidKey = rowGuid; |
| | | //if (string.IsNullOrEmpty(rowGuid)) |
| | | //{ |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | //} |
| | | //if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定操作吗?")) |
| | | // return; |
| | | |
| | | System.Text.StringBuilder sb = new System.Text.StringBuilder(); |
| | | gvMx2.PostEditor(); |
| | | gvMx2.UpdateCurrentRow(); |
| | | DataTable dt = this.gcMx2.DataSource as DataTable; |
| | | { |
| | | foreach (DataRow dr in dt.Rows) |
| | | { |
| | | string checkBox = dr["chkInt"].ToString(); |
| | | string _guid = dr["guid"].ToString(); |
| | | if (Gs.DevApp.ToolBox.UtilityHelper.ToCheck(checkBox)) |
| | | { |
| | | if (sb.Length > 0) |
| | | sb.Append(","); |
| | | sb.Append(_guid); |
| | | } |
| | | } |
| | | } |
| | | if (string.IsNullOrEmpty(sb.ToString())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("提示:请先选择条码!"); |
| | | return; |
| | | } |
| | | |
| | | //Gs.DevApp.ToolBox.MsgHelper.ShowError(sb.ToString()); |
| | | |
| | | var _obj = new |
| | | { |
| | | billNo = sb.ToString(), |
| | | inFieldValue = _inFieldValue.ToString() |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModelChbg", 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, "checkStatus", "checkUser", "checkDate", picCheckBox, this, _inFieldValue.ToString()); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | #endregion |
| | | } |
| | | } |