| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using FastReport.Dialog; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | toolBarMenu1.btnChkClick += ToolBarMenu1_btnChkClick; |
| | | toolBarMenu1.btnFChkClick += ToolBarMenu1_btnFChkClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | gridView1.FocusedRowChanged += (s, e) => |
| | | { |
| | | UtilityHelper.SetCheckIco(s, picCheckBox, this, "checkStatus",""); |
| | | }; |
| | | gridView1.CustomDrawRowIndicator += |
| | | GridView1_CustomDrawRowIndicator; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | } |
| | | |
| | | |
| | | private void GridView1_CustomDrawRowIndicator(object sender, |
| | | RowIndicatorCustomDrawEventArgs e) |
| | |
| | | } |
| | | |
| | | getModel(rowGuid, true, 1); |
| | | |
| | | |
| | | } |
| | | /// <summary> |
| | | /// 删除事件 |
| | |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_name, gridView1); |
| | | lbGuid, txt_name, gridView1, "name"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnLoadClick(object sender, EventArgs e) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | if (xtraTabControl1.SelectedTabPageIndex == 1) |
| | | getModel(lbGuid.Text.Trim(), false, 999); |
| | | else |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | |
| | | var _obj = new |
| | | { |
| | | guid = lbGuid.Text.Trim(), //主建 |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | name = txt_name.Text.Trim(), |
| | | time1 = txt_begTime.Value.Date, |
| | | time2 = txt_endTime.Value.Date, |
| | |
| | | |
| | | private void getTree() |
| | | { |
| | | var pgq = new PageQueryModel(1, 999999, "workshop_no", "asc", |
| | | var pgq = new PageQueryModel(1, 999999, "departmentid", "asc", |
| | | "notree", " and is_Status=1"); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = UtilityHelper.HttpPost("", |
| | | "MesWorkshopManager/GetListPage", json); |
| | | "SysDepartmentManager/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = dd.rtnData.list; |
| | | txt_workshopNo.Properties.DataSource = dt; |
| | | txt_workshopNo.Properties.DisplayMember = "name"; // 显示的列 |
| | | txt_workshopNo.Properties.ValueMember = "workshopNo"; // 实际值的列 |
| | | txt_workshopNo.Properties.DisplayMember = "departmentname"; // 显示的列 |
| | | txt_workshopNo.Properties.ValueMember = "guid"; // 实际值的列 |
| | | txt_workshopNo.Properties.TextEditStyle = |
| | | TextEditStyles.DisableTextEditor; |
| | | } |