| | |
| | | using DevExpress.RichEdit.Export; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | this.toolBarMenu1.btnTzblClick += ToolBarMenu1_btnTzblClick; |
| | | this.toolBarMenu1.btnKgClick += ToolBarMenu1_btnKgClick; |
| | | this.toolBarMenu1.btnWgClick += ToolBarMenu1_btnWgClick; |
| | | this.toolBarMenu1.btnJieAnClick += ToolBarMenu1_btnJieAnClick1; |
| | | this.toolBarMenu1.btnFjieAnClick += ToolBarMenu1_btnFjieAnClick; |
| | | toolBarMenu1.btnLogClick += ToolBarMenu1_btnLogClick; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gridView1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.getGridViewConfig(this.GetType().FullName, gvList); |
| | | this.toolBarMenu1.getXmlConfig(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx2); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameterMx(gvMx3); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridViewParameter(gridView1, null, null, null, "", (value) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.JumpTab(xtraTabControl1, 0); |
| | |
| | | getPageList(1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | |
| | | //这是报工码 |
| | | this.ucBtnPrint1.btnDesignClick += (s, e) => |
| | | { |
| | | ucBtnPrint1.rptParameter = "rpt_daa{}"; |
| | |
| | | { |
| | | _print(); |
| | | }; |
| | | //这是追溯码 |
| | | this.ucBtnPrint98.btnDesignClick += (s, e) => { |
| | | ucBtnPrint98.rptParameter = "rpt_trace{}"; |
| | | }; |
| | | this.ucBtnPrint98.btnReportClick += (s, e) => |
| | | { |
| | | _print98(); |
| | | }; |
| | | } |
| | | |
| | | |
| | | |
| | | private void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | _filterList= Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns, gridView1); |
| | | Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList, this.GetType().FullName); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | | } |
| | |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 结案 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | private void ToolBarMenu1_btnFjieAnClick(object sender, EventArgs e) |
| | | { |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 反结案 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | /// <exception cref="NotImplementedException"></exception> |
| | | |
| | | private void ToolBarMenu1_btnJieAnClick1(object sender, EventArgs e) |
| | | { |
| | | _toolCk(99); |
| | | } |
| | | private void ToolBarMenu1_btnTzblClick(object sender, EventArgs e) |
| | | { |
| | |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.ChangeEnableByControl(panel1.Controls, true, gvList); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, true, gvList); |
| | | } |
| | | } |
| | | |
| | |
| | | toolBarMenu1.isSetBtn = true; |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | UtilityHelper.ChangeEnableByControl(this.panel1.Controls, false, gvList); |
| | | UtilityHelper.ChangeEnableByControl(this.layoutMx1.Controls, false, gvList); |
| | | toolBarMenu1.currentAction = ""; |
| | | txt_printRemark.Enabled = txt_psnQty_1.Enabled = txt_iCount_1.Enabled = true; |
| | | txt_printRemark.ReadOnly = txt_psnQty_1.ReadOnly = txt_iCount_1.ReadOnly = false; |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gcMain1.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | gridView1.BestFitColumns(); |
| | | gcMain1.DataSource = dt; |
| | | gcMain1.ForceInitialize(); |
| | | gridView1.BestFitColumns(); Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gridView1); |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | UtilityHelper.SetDefaultTable(gcMain1, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | |
| | | List<DevExpress.XtraGrid.Views.Grid.GridView> gvList = new List<DevExpress.XtraGrid.Views.Grid.GridView>(); |
| | | gvList.Add(gvMx1); |
| | | gvList.Add(gvMx2); |
| | | UtilityHelper.SetValueByObj(this.panel1.Controls, dy, isEdit, gvList); |
| | | UtilityHelper.SetValueByObj(this.layoutMx1.Controls, dy, isEdit, gvList); |
| | | JObject _job = JObject.Parse(strJson); |
| | | JArray array = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list"]) |
| | |
| | | gcMx1.DataSource = dt; |
| | | gcMx1.ForceInitialize(); |
| | | gvMx1.BestFitColumns(); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridLayout(gvMx1); |
| | | } |
| | | else |
| | | { |
| | |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx2, gvMx2); |
| | | } |
| | | |
| | | JArray array3 = new JArray(); |
| | | foreach (var a in _job["rtnData"]["list3"]) |
| | | { |
| | | array3.Add(a); |
| | | } |
| | | DataTable dt3 = JsonConvert.DeserializeObject<DataTable>(array3.ToString()); |
| | | if (dt3.Rows.Count > 0) |
| | | { |
| | | gcMx3.BindingContext = new BindingContext(); |
| | | gcMx3.DataSource = dt3; |
| | | gcMx3.ForceInitialize(); |
| | | gvMx3.BestFitColumns(); |
| | | } |
| | | else |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetDefaultTable(gcMx3, gvMx3); |
| | | } |
| | | } |
| | | else |
| | |
| | | case 9: |
| | | strMsg = "手动完工"; |
| | | break; |
| | | case 99: |
| | | strMsg = "结案"; |
| | | break; |
| | | }; |
| | | toolBarMenu1.guidKey = ""; |
| | | string rowGuid, rowName; |
| | |
| | | } |
| | | else { |
| | | //注意,这里和其它页面有点不一样 |
| | | int rowHandle = gridView1.LocateByValue(1, gridView1.Columns["guid"], rowGuid); |
| | | getPageList(this.pageBar1.CurrentPage); |
| | | int rowHandle = gridView1.LocateByValue("guid", rowGuid); |
| | | gridView1.FocusedRowHandle = rowHandle; |
| | | } |
| | | } |
| | |
| | | + "," + txt_psnQty_1.Text.Trim() |
| | | + "}"; |
| | | } |
| | | private void _print98() |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_daa001, gridView1); |
| | | ucBtnPrint98.guidKey = rowGuid; |
| | | if (rowGuid.Length < 36) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择你要打印的行!"); |
| | | this.ucBtnPrint98.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(txt_iCount_98.Text.Trim())) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.ShowError("请选择打印条码张数!"); |
| | | txt_iCount_98.Focus(); |
| | | this.ucBtnPrint98.rptParameter = "return false"; |
| | | return; |
| | | } |
| | | this.ucBtnPrint98.rptParameter = "rpt_trace{" + "" |
| | | + "," + txt_printRemark.Text.Trim() |
| | | + "," + "" |
| | | + "," + txt_iCount_98.Text.Trim() |
| | | + "," + 1 |
| | | + "}"; |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | | { |
| | |
| | | var _obj = new |
| | | { |
| | | mxGuid = mxGuid, |
| | | inType = "dhtm" |
| | | inType = "daa" |
| | | }; |
| | | try |
| | | { |
| | | var strJson = UtilityHelper.HttpPost("", |
| | | _webServiceName + "DeleteBarcode", |
| | | "VArrivalBarcodeManager/DeleteBarcode", |
| | | JsonConvert.SerializeObject(_obj)); |
| | | var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | if (_rtn.rtnCode > 0) |
| | |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |