| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1219, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(928, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1137, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(936, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1158, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(912, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(970, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1281, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1001, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(990, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1342, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1342, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1127, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | /// </summary> |
| | | private void InitializeComponent() |
| | | { |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | this.gvMx2itemId = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx2moveOk = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx2suppNo = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | |
| | | this.gvMx1qd004 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1qd007 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1qd008 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1qd009 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gvMx1qd010 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.gv_ts = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | |
| | | this.txt_fromDepotsId = new Gs.DevApp.UserControl.UcLookCk(); |
| | | this.labelControl11 = new DevExpress.XtraEditors.LabelControl(); |
| | | this.lbGuid = new System.Windows.Forms.Label(); |
| | | this.gridColumn2 = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.tabMxPage2.SuspendLayout(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gcMx2)).BeginInit(); |
| | | ((System.ComponentModel.ISupportInitialize)(this.gvMx2)).BeginInit(); |
| | |
| | | // repositoryItemButtonEdit1 |
| | | // |
| | | this.repositoryItemButtonEdit1.AutoHeight = false; |
| | | editorButtonImageOptions2.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.removegroupfooter_16x16; |
| | | editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移出", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "移出", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; |
| | | this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); |
| | |
| | | this.gvMx1qd007.FieldName = "quantity"; |
| | | this.gvMx1qd007.MinWidth = 50; |
| | | this.gvMx1qd007.Name = "gvMx1qd007"; |
| | | this.gvMx1qd007.Tag = "query_a.qd007"; |
| | | this.gvMx1qd007.Tag = "yz_quantity_0"; |
| | | this.gvMx1qd007.Visible = true; |
| | | this.gvMx1qd007.VisibleIndex = 7; |
| | | this.gvMx1qd007.Width = 94; |
| | |
| | | this.gvMx1qd008.FieldName = "quantityCkok"; |
| | | this.gvMx1qd008.MinWidth = 50; |
| | | this.gvMx1qd008.Name = "gvMx1qd008"; |
| | | this.gvMx1qd008.Tag = "query_a.qd008"; |
| | | this.gvMx1qd008.Tag = ""; |
| | | this.gvMx1qd008.Visible = true; |
| | | this.gvMx1qd008.VisibleIndex = 8; |
| | | this.gvMx1qd008.Width = 94; |
| | | // |
| | | // gridColumn2 |
| | | // |
| | | this.gridColumn2.Caption = "已调拨数量"; |
| | | this.gridColumn2.FieldName = "quantityOk"; |
| | | this.gridColumn2.MinWidth = 25; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 9; |
| | | this.gridColumn2.Width = 94; |
| | | // |
| | | // gvMx1qd009 |
| | | // |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.lbGuid.Name = "lbGuid"; |
| | | this.lbGuid.Size = new System.Drawing.Size(0, 21); |
| | | this.lbGuid.TabIndex = 1; |
| | | // |
| | | // gridColumn2 |
| | | // |
| | | this.gridColumn2.Caption = "已调拨数量"; |
| | | this.gridColumn2.FieldName = "quantityOk"; |
| | | this.gridColumn2.MinWidth = 25; |
| | | this.gridColumn2.Name = "gridColumn2"; |
| | | this.gridColumn2.Visible = true; |
| | | this.gridColumn2.VisibleIndex = 8; |
| | | this.gridColumn2.Width = 94; |
| | | // |
| | | // Frm_MesInvItemMoves |
| | | // |
| | |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Grid; |
| | | using DevExpress.XtraGrid.Views.Grid.ViewInfo; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | |
| | | Rectangle r = new Rectangle(gridView1.GridControl.Width / 2 - 100, e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | |
| | | gvMx1.ValidatingEditor += (sender, e) => |
| | | { |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetValidatingEditor(sender, e); |
| | | }; |
| | | |
| | | var _obj = new |
| | | { |
| | | currentPage = 1, |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | |
| | | private void ToolBarMenu1_btnSaveClick(object sender, EventArgs e) |
| | | { |
| | | toolBarMenu1.isSetBtn = false; |
| | | //if (string.IsNullOrEmpty(txt_account.Text.Trim())) |
| | | string _fromDepotsId = txt_fromDepotsId.GetId(); |
| | | string _invDepotsId = txt_invDepotsId.GetId(); |
| | | if (string.IsNullOrEmpty(_fromDepotsId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("登录账号不能为空!"); |
| | | // txt_account.Focus(); |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("发料仓不能为空!"); |
| | | txt_fromDepotsId.Focus(); |
| | | return; |
| | | } |
| | | if (string.IsNullOrEmpty(_invDepotsId)) |
| | | { |
| | | Gs.DevApp.ToolBox.MsgHelper.Warning("收料仓不能为空!"); |
| | | txt_invDepotsId.Focus(); |
| | | return; |
| | | } |
| | | var _obj = new |
| | | { |
| | | guid = UtilityHelper.ToGuid(lbGuid.Text.Trim()), //主建 |
| | | inFromDepotsId = _fromDepotsId,//发料仓 |
| | | inInvDepotsId = _invDepotsId,//收料仓 |
| | | inBz = txt_remark.Text.Trim(),//备注 |
| | | list = new List<dynamic>(), |
| | | }; |
| | | gvMx1.CloseEditor(); |
| | | gvMx1.UpdateCurrentRow(); |
| | | if (gvMx1.DataRowCount <= 0) |
| | | { |
| | | MsgHelper.ShowError("明细不能为空,请选择你的收料明细!"); |
| | | return; |
| | | } |
| | | for (var i = 0; i < gvMx1.DataRowCount; i++) |
| | | { |
| | | var row = gvMx1.GetDataRow(i); |
| | | if (row != null) |
| | | { |
| | | Guid? _guid = UtilityHelper.ToGuid(row["guid"].ToString()); |
| | | //string _msl = row["quantity"].ToString(); |
| | | //if (string.IsNullOrEmpty(_msl)) |
| | | //{ |
| | | // MsgHelper.ShowError("数量不能为空!"); |
| | | // return; |
| | | //} |
| | | _obj.list.Add(new |
| | | { |
| | | Guid = _guid, |
| | | ItemId = (row["itemId"].ToString()), |
| | | Sqsl = (row["quantity"].ToString()), |
| | | Bz = (row["remark"].ToString()), |
| | | }); |
| | | } |
| | | } |
| | | try |
| | | { |
| | | string strJson = UtilityHelper.HttpPost("", _webServiceName + "EditModel", JsonConvert.SerializeObject(_obj)); |
| | |
| | | { |
| | | SearchLookUpEdit LookupEdit = sender as SearchLookUpEdit; |
| | | DataRowView SelectedDataRow = (DataRowView)LookupEdit.GetSelectedDataRow(); |
| | | gvMx1.SetFocusedRowCellValue("qd002", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("qd003", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("qd004", SelectedDataRow["itemModel"]); |
| | | gvMx1.SetFocusedRowCellValue("itemNo", SelectedDataRow["itemNo"]); |
| | | gvMx1.SetFocusedRowCellValue("itemName", SelectedDataRow["itemName"]); |
| | | gvMx1.SetFocusedRowCellValue("itemModel", SelectedDataRow["itemModel"]); |
| | | } |
| | | |
| | | private void repositoryItemButtonEdit1_ButtonClick(object sender, DevExpress.XtraEditors.Controls.ButtonPressedEventArgs e) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(947, 38); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.roleName.MinWidth = 25; |
| | | this.roleName.Name = "roleName"; |
| | | this.roleName.OptionsColumn.AllowEdit = false; |
| | | this.roleName.Tag = "query_a.role_Name"; |
| | | this.roleName.Tag = "query_role_Name"; |
| | | this.roleName.Visible = true; |
| | | this.roleName.VisibleIndex = 0; |
| | | this.roleName.Width = 94; |
| | |
| | | this.rolRemark.MinWidth = 25; |
| | | this.rolRemark.Name = "rolRemark"; |
| | | this.rolRemark.OptionsColumn.AllowEdit = false; |
| | | this.rolRemark.Tag = "query_a.role_Remark"; |
| | | this.rolRemark.Tag = "query_role_Remark"; |
| | | this.rolRemark.Visible = true; |
| | | this.rolRemark.VisibleIndex = 1; |
| | | this.rolRemark.Width = 94; |
| | |
| | | this.status.MinWidth = 25; |
| | | this.status.Name = "status"; |
| | | this.status.OptionsColumn.AllowEdit = false; |
| | | this.status.Tag = "query_a.is_Status"; |
| | | this.status.Tag = "query_is_Status"; |
| | | this.status.Visible = true; |
| | | this.status.VisibleIndex = 2; |
| | | this.status.Width = 94; |
| | |
| | | this.roleCreateBy.MinWidth = 25; |
| | | this.roleCreateBy.Name = "roleCreateBy"; |
| | | this.roleCreateBy.OptionsColumn.AllowEdit = false; |
| | | this.roleCreateBy.Tag = "query_create_by"; |
| | | this.roleCreateBy.Visible = true; |
| | | this.roleCreateBy.VisibleIndex = 3; |
| | | this.roleCreateBy.Width = 94; |
| | |
| | | this.createDate.MinWidth = 25; |
| | | this.createDate.Name = "createDate"; |
| | | this.createDate.OptionsColumn.AllowEdit = false; |
| | | this.createDate.Tag = "query_a.create_Time"; |
| | | this.createDate.Tag = "query_create_Time"; |
| | | this.createDate.Visible = true; |
| | | this.createDate.VisibleIndex = 4; |
| | | this.createDate.Width = 94; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 4, 3, 4); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 0; |
| | | this.pageBar1.Size = new System.Drawing.Size(1235, 40); |
| | | this.pageBar1.TabIndex = 6; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.xtraTabPage2.Controls.Add(this.panel1); |
| | | this.xtraTabPage2.Name = "xtraTabPage2"; |
| | | this.xtraTabPage2.PageEnabled = false; |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(933, 629); |
| | | this.xtraTabPage2.Size = new System.Drawing.Size(1235, 629); |
| | | this.xtraTabPage2.Text = "数据编辑"; |
| | | // |
| | | // panel1 |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Drawing; |
| | | using System.Data; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraGrid.Views.Base; |
| | | using Gs.DevApp.Entity; |
| | | using Gs.DevApp.Properties; |
| | | using Gs.DevApp.ToolBox; |
| | | using Gs.DevApp.UserControl; |
| | | using Newtonsoft.Json; |
| | |
| | | { |
| | | private StringBuilder _actionLst = new StringBuilder(); |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | |
| | | public Role() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | //gridView1.FocusedRowChanged += GridView1_FocusedRowChanged; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.IndicatorWidth = 50; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | | gridView1.CustomDrawEmptyForeground += (s, e) => |
| | | { |
| | | var str = "暂未查找到匹配的数据!"; |
| | | var f = new Font("微软雅黑", 16); |
| | | var r = new Rectangle(gridView1.GridControl.Width / 2 - 100, |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | { |
| | | string rowGuid, rowName; |
| | | (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | lbGuid, txt_roleName, gridView1,"", 2); |
| | | lbGuid, txt_roleName, gridView1, "roleName"); |
| | | if (string.IsNullOrEmpty(rowGuid)) |
| | | { |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + |
| | | "】,确定删除吗?\n该操作将会清空相应的用户权限")) |
| | | if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定删除吗?\n该操作将会清空相应的用户权限")) |
| | | return; |
| | | var lst = new List<string>(); |
| | | lst.Add(rowGuid); |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | } |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | |
| | | /// <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 |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | } |
| | | |
| | | /// <summary> |
| | | /// 权限设置事件 |
| | | /// </summary> |
| | | /// <param name="sender"></param> |
| | | /// <param name="e"></param> |
| | | //private void ToolBarMenu1_btnRoleClick(object sender, EventArgs e) |
| | | //{ |
| | | // string rowGuid, rowName; |
| | | // (rowGuid, rowName) = UtilityHelper.GetCurrentRow(xtraTabControl1, |
| | | // lbGuid, txt_roleName, gridView1); |
| | | // if (string.IsNullOrEmpty(rowGuid)) |
| | | // { |
| | | // MsgHelper.Warning("请先选择你要操作的行!"); |
| | | // return; |
| | | // } |
| | | |
| | | // if (!MsgHelper.AskQuestion("你选择了【" + rowName + "】,确定设置权限吗?")) |
| | | // return; |
| | | // _actionLst = new StringBuilder(); |
| | | // TraverseTreeViewNodes(trv.Nodes); |
| | | // var _obj = new |
| | | // { |
| | | // roleGuid = rowGuid, |
| | | // actionLst = _actionLst.ToString() |
| | | // }; |
| | | // try |
| | | // { |
| | | // var strJson = UtilityHelper.HttpPost("", |
| | | // "Role/SetRoleMenuAction", |
| | | // JsonConvert.SerializeObject(_obj)); |
| | | // var _rtn = UtilityHelper.ReturnToDynamic(strJson); |
| | | // MsgHelper.Warning("提示:" + _rtn.rtnData.outMsg); |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MsgHelper.Warning("提示:" + ex.Message); |
| | | // } |
| | | //} |
| | | |
| | | /// <summary> |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "CREATE_TIME", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "CREATE_TIME", |
| | | "desc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = |
| | | UtilityHelper.HttpPost("", "Role/GetListPage", json); |
| | | await UtilityHelper.HttpPostAsync("", "Role/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = dd.rtnData.list; |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | var dddd = dd.rtnData.pages; //总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Close(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | } |
| | | |
| | | //private void getTree(string roleGuid) |
| | | //{ |
| | | // trv.Nodes.Clear(); |
| | | // var imageList = new ImageList(); |
| | | // imageList.Images.Add("icon0", Resources.publicfix_32x32); |
| | | // imageList.Images.Add("icon1", Resources.addfooter_32x32); |
| | | // imageList.Images.Add("icon2", Resources.listmultilevel_16x16); |
| | | // imageList.Images.Add("icon3", Resources.addcalculatedfield_16x16); |
| | | // trv.ImageList = imageList; |
| | | // var _obj = new |
| | | // { |
| | | // roleGuid //主建 |
| | | // }; |
| | | // try |
| | | // { |
| | | // var strReturn = UtilityHelper.HttpPost("", "Role/GetListByRole", |
| | | // JsonConvert.SerializeObject(_obj)); |
| | | // var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | // var dt = dd.rtnData.list; |
| | | // var drGrp = dt.Select("upGuid='' or upGuid is null"); |
| | | // foreach (var _dy in drGrp) |
| | | // { |
| | | // var _orgGuid = _dy["guid"] + "&"; |
| | | // var node = new TreeNode(); //定义结点 |
| | | // node.Text = _dy["name"].ToString(); //为结点赋值 |
| | | // node.Name = _dy["guid"].ToString(); |
| | | // node.ImageIndex = 0; |
| | | // node.Checked = _dy["isCk"].ToString() == "1" ? true : false; |
| | | // var drItem = dt.Select("upGuid='" + _dy["guid"] + |
| | | // "' and orgGuid='" + _dy["guid"] + |
| | | // "'"); |
| | | // foreach (var _dy2 in drItem) |
| | | // { |
| | | // var node22 = new TreeNode(); //定义结点 |
| | | // node22.Text = _dy2["name"].ToString(); //为结点赋值 |
| | | // node22.Name = _orgGuid + _dy2["guid"]; |
| | | // node22.ImageIndex = 1; |
| | | // node22.Checked = _dy2["isCk"].ToString() == "1" |
| | | // ? true |
| | | // : false; |
| | | // var drItem33 = dt.Select("upGuid='" + _dy2["guid"] + |
| | | // "' and orgGuid='" + |
| | | // _dy["guid"] + "'"); |
| | | // foreach (var _dy3 in drItem33) |
| | | // { |
| | | // var node33 = new TreeNode(); //定义结点 |
| | | // node33.Text = _dy3["name"].ToString(); //为结点赋值 |
| | | // node33.Name = _orgGuid + _dy3["guid"]; |
| | | // node33.ImageIndex = 2; |
| | | // node33.Checked = _dy3["isCk"].ToString() == "1" |
| | | // ? true |
| | | // : false; |
| | | // var drItem44 = dt.Select("upGuid='" + _dy3["guid"] + |
| | | // "' and orgGuid='" + _dy["guid"] + "'"); |
| | | // foreach (var _dy4 in drItem44) |
| | | // { |
| | | // var node44 = new TreeNode(); //定义结点 |
| | | // node44.Text = _dy4["name"].ToString(); //为结点赋值 |
| | | // node44.Name = _orgGuid + _dy4["guid"]; |
| | | // node44.ImageIndex = 3; |
| | | // node44.Checked = _dy4["isCk"].ToString() == "1" |
| | | // ? true |
| | | // : false; |
| | | // node33.Nodes.Add(node44); |
| | | // } |
| | | |
| | | // node22.Nodes.Add(node33); |
| | | // } |
| | | |
| | | // node22.Expand(); |
| | | // node.Nodes.Add(node22); |
| | | // } |
| | | |
| | | // node.Expand(); |
| | | // trv.Nodes.Add(node); |
| | | // } |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MsgHelper.Warning("提示:" + ex.Message); |
| | | // } |
| | | //} |
| | | |
| | | //private void Trv_AfterCheck(object sender, TreeViewEventArgs e) |
| | | //{ |
| | | // try |
| | | // { |
| | | // trv.AfterCheck -= Trv_AfterCheck; |
| | | // UtilityHelper.TreeViewCheck(e); |
| | | // trv.AfterCheck += Trv_AfterCheck; |
| | | // } |
| | | // catch (Exception ex) |
| | | // { |
| | | // MsgHelper.ShowError(ex.Message); |
| | | // } |
| | | //} |
| | | |
| | | // 遍历TreeView中的所有节点 |
| | | private void TraverseTreeViewNodes(TreeNodeCollection nodes) |
| | |
| | | { |
| | | DevExpress.XtraGrid.GridFormatRule gridFormatRule1 = new DevExpress.XtraGrid.GridFormatRule(); |
| | | DevExpress.XtraEditors.FormatConditionRuleExpression formatConditionRuleExpression1 = new DevExpress.XtraEditors.FormatConditionRuleExpression(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions5 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject17 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject18 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject19 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject20 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions6 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions1 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject1 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject2 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject3 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject4 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.XtraEditors.Controls.EditorButtonImageOptions editorButtonImageOptions2 = new DevExpress.XtraEditors.Controls.EditorButtonImageOptions(); |
| | | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(User)); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject21 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject22 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject23 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject24 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject5 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject6 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject7 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | DevExpress.Utils.SerializableAppearanceObject serializableAppearanceObject8 = new DevExpress.Utils.SerializableAppearanceObject(); |
| | | this.isLocked = new DevExpress.XtraGrid.Columns.GridColumn(); |
| | | this.toolBarMenu1 = new Gs.DevApp.UserControl.UcToolBarMenu(); |
| | | this.gcMain = new DevExpress.XtraGrid.GridControl(); |
| | |
| | | this.isLocked.MinWidth = 25; |
| | | this.isLocked.Name = "isLocked"; |
| | | this.isLocked.OptionsColumn.AllowEdit = false; |
| | | this.isLocked.Tag = "query_a.IS_STATUS"; |
| | | this.isLocked.Tag = "query_IS_STATUS"; |
| | | this.isLocked.Visible = true; |
| | | this.isLocked.VisibleIndex = 7; |
| | | this.isLocked.Width = 94; |
| | |
| | | this.account.MinWidth = 25; |
| | | this.account.Name = "account"; |
| | | this.account.OptionsColumn.AllowEdit = false; |
| | | this.account.Tag = "query_a.ACCOUNT"; |
| | | this.account.Tag = "query_ACCOUNT"; |
| | | this.account.Visible = true; |
| | | this.account.VisibleIndex = 0; |
| | | this.account.Width = 94; |
| | |
| | | this.userName.MinWidth = 25; |
| | | this.userName.Name = "userName"; |
| | | this.userName.OptionsColumn.AllowEdit = false; |
| | | this.userName.Tag = "query_a.USER_NAME"; |
| | | this.userName.Tag = "query_USER_NAME"; |
| | | this.userName.Visible = true; |
| | | this.userName.VisibleIndex = 1; |
| | | this.userName.Width = 94; |
| | |
| | | this.tel.MinWidth = 25; |
| | | this.tel.Name = "tel"; |
| | | this.tel.OptionsColumn.AllowEdit = false; |
| | | this.tel.Tag = "query_a.tel"; |
| | | this.tel.Tag = "query_tel"; |
| | | this.tel.Visible = true; |
| | | this.tel.VisibleIndex = 2; |
| | | this.tel.Width = 94; |
| | |
| | | this.email.MinWidth = 25; |
| | | this.email.Name = "email"; |
| | | this.email.OptionsColumn.AllowEdit = false; |
| | | this.email.Tag = "query_a.email"; |
| | | this.email.Tag = "query_email"; |
| | | this.email.Visible = true; |
| | | this.email.VisibleIndex = 3; |
| | | this.email.Width = 94; |
| | |
| | | this.colCreateBy.MinWidth = 25; |
| | | this.colCreateBy.Name = "colCreateBy"; |
| | | this.colCreateBy.OptionsColumn.AllowEdit = false; |
| | | this.colCreateBy.Tag = "query_CREATE_BY"; |
| | | this.colCreateBy.Visible = true; |
| | | this.colCreateBy.VisibleIndex = 4; |
| | | this.colCreateBy.Width = 94; |
| | |
| | | this.createTime.MinWidth = 25; |
| | | this.createTime.Name = "createTime"; |
| | | this.createTime.OptionsColumn.AllowEdit = false; |
| | | this.createTime.Tag = "query_a.CREATE_TIME"; |
| | | this.createTime.Tag = "query_CREATE_TIME"; |
| | | this.createTime.Visible = true; |
| | | this.createTime.VisibleIndex = 5; |
| | | this.createTime.Width = 94; |
| | |
| | | this.lastLoginTime.MinWidth = 25; |
| | | this.lastLoginTime.Name = "lastLoginTime"; |
| | | this.lastLoginTime.OptionsColumn.AllowEdit = false; |
| | | this.lastLoginTime.Tag = "query_a.LASTLOGIN_TIME"; |
| | | this.lastLoginTime.Tag = "query_LASTLOGIN_TIME"; |
| | | this.lastLoginTime.Visible = true; |
| | | this.lastLoginTime.VisibleIndex = 6; |
| | | this.lastLoginTime.Width = 94; |
| | |
| | | this.loginCounter.MinWidth = 25; |
| | | this.loginCounter.Name = "loginCounter"; |
| | | this.loginCounter.OptionsColumn.AllowEdit = false; |
| | | this.loginCounter.Tag = "query_a.LOGIN_COUNTER"; |
| | | this.loginCounter.Tag = "query_LOGIN_COUNTER"; |
| | | this.loginCounter.Visible = true; |
| | | this.loginCounter.VisibleIndex = 8; |
| | | this.loginCounter.Width = 94; |
| | |
| | | // repositoryItemButtonEdit1 |
| | | // |
| | | this.repositoryItemButtonEdit1.AutoHeight = false; |
| | | editorButtonImageOptions5.Image = global::Gs.DevApp.Properties.Resources.user_16x16; |
| | | editorButtonImageOptions5.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | serializableAppearanceObject17.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | serializableAppearanceObject17.Options.UseFont = true; |
| | | editorButtonImageOptions1.Image = global::Gs.DevApp.Properties.Resources.user_16x16; |
| | | editorButtonImageOptions1.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | serializableAppearanceObject1.Font = new System.Drawing.Font("Tahoma", 10F); |
| | | serializableAppearanceObject1.Options.UseFont = true; |
| | | this.repositoryItemButtonEdit1.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "设置角色", -1, true, true, false, editorButtonImageOptions5, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject17, serializableAppearanceObject18, serializableAppearanceObject19, serializableAppearanceObject20, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "设置角色", -1, true, true, false, editorButtonImageOptions1, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject1, serializableAppearanceObject2, serializableAppearanceObject3, serializableAppearanceObject4, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit1.Name = "repositoryItemButtonEdit1"; |
| | | this.repositoryItemButtonEdit1.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit1.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit1_ButtonClick); |
| | |
| | | // repositoryItemButtonEdit2 |
| | | // |
| | | this.repositoryItemButtonEdit2.AutoHeight = false; |
| | | editorButtonImageOptions6.Image = ((System.Drawing.Image)(resources.GetObject("editorButtonImageOptions6.Image"))); |
| | | editorButtonImageOptions6.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | editorButtonImageOptions2.Image = ((System.Drawing.Image)(resources.GetObject("editorButtonImageOptions2.Image"))); |
| | | editorButtonImageOptions2.ImageToTextAlignment = DevExpress.XtraEditors.ImageAlignToText.LeftCenter; |
| | | this.repositoryItemButtonEdit2.Buttons.AddRange(new DevExpress.XtraEditors.Controls.EditorButton[] { |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "重置密码", -1, true, true, false, editorButtonImageOptions6, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject21, serializableAppearanceObject22, serializableAppearanceObject23, serializableAppearanceObject24, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | new DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Glyph, "重置密码", -1, true, true, false, editorButtonImageOptions2, new DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), serializableAppearanceObject5, serializableAppearanceObject6, serializableAppearanceObject7, serializableAppearanceObject8, "", null, null, DevExpress.Utils.ToolTipAnchor.Default)}); |
| | | this.repositoryItemButtonEdit2.Name = "repositoryItemButtonEdit2"; |
| | | this.repositoryItemButtonEdit2.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor; |
| | | this.repositoryItemButtonEdit2.ButtonClick += new DevExpress.XtraEditors.Controls.ButtonPressedEventHandler(this.repositoryItemButtonEdit2_ButtonClick); |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(736, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | using System; |
| | | using System.Collections.Generic; |
| | | using System.Data; |
| | | using System.Drawing; |
| | | using System.Text; |
| | | using System.Threading.Tasks; |
| | | using System.Windows.Forms; |
| | | using DevExpress.XtraEditors; |
| | | using DevExpress.XtraEditors.Controls; |
| | |
| | | public partial class User : XtraForm |
| | | { |
| | | private List<FilterEntity> _filterList = new List<FilterEntity>(); |
| | | |
| | | public User() |
| | | { |
| | | InitializeComponent(); |
| | |
| | | toolBarMenu1.btnEscClick += ToolBarMenu1_btnEscClick; |
| | | toolBarMenu1.btnQueryClick += ToolBarMenu1_btnQueryClick; |
| | | gcMain.MouseDoubleClick += GcMain_MouseDoubleClick; |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | Gs.DevApp.ToolBox.UtilityHelper.SetGridSear(gridView1); |
| | | pageBar1.PagerEvent += PageBar1_PagerEvent; |
| | | gridView1.IndicatorWidth = 50; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | | gridView1.CustomDrawEmptyForeground += (s, e) => |
| | | { |
| | | var str = "暂未查找到匹配的数据!"; |
| | | var f = new Font("微软雅黑", 16); |
| | | var r = new Rectangle(gridView1.GridControl.Width / 2 - 100, |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | } |
| | | |
| | | private async void GridView1_ColumnFilterChanged(object sender, EventArgs e) |
| | | { |
| | | _filterList = Gs.DevApp.ToolBox.UtilityHelper.GetDilter(gridView1.Columns); |
| | | await Task.Delay(100); |
| | | getPageList(1); |
| | | } |
| | | /// <summary> |
| | | /// 双击事件 |
| | | /// </summary> |
| | |
| | | /// <param name="pageSize"></param> |
| | | private void PageBar1_PagerEvent(int curPage, int pageSize) |
| | | { |
| | | getPageList(curPage, pageSize); |
| | | getPageList(curPage); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// <param name="e"></param> |
| | | private void ToolBarMenu1_btnQueryClick(object sender, EventArgs e) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | var frm = new ShowFilter(gridView1.Columns, _filterList); |
| | | frm.UpdateParent += Frm_UpdateParent; |
| | | frm.ShowDialog(); |
| | |
| | | private void Frm_UpdateParent(object sender, UpdateParentEventArgs e) |
| | | { |
| | | _filterList = e.FilterList; |
| | | getPageList(1, pageBar1.RowsCount); |
| | | getPageList(1); |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | if (_rtn.rtnCode > 0) |
| | | { |
| | | UtilityHelper.JumpToTab(xtraTabControl1, 0); |
| | | getPageList(1, UtilityHelper.GetPageSize()); |
| | | getPageList(1); |
| | | } |
| | | |
| | | MsgHelper.Warning("提示:" + _rtn.rtnMsg); |
| | |
| | | /// <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 |
| | | { |
| | | _filterList.Clear(); |
| | | if (gridView1.ActiveFilter.Count > 0) |
| | | { |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | gridView1.ActiveFilter.Clear(); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | } |
| | | getPageList(1); |
| | | } |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | /// </summary> |
| | | /// <param name="curPage">第几页</param> |
| | | /// <param name="pageSize">每页几条</param> |
| | | private void getPageList(int curPage, int pageSize) |
| | | private async void getPageList(int curPage) |
| | | { |
| | | var _sbSqlWhere = new StringBuilder(); |
| | | foreach (var itm in _filterList) |
| | | _sbSqlWhere.Append(" and " + itm.fileId + itm.fileOper + "'" + |
| | | itm.fileValue + "'"); |
| | | var pgq = new PageQueryModel(curPage, pageSize, "CREATE_TIME", |
| | | UcLoading _loading = new UcLoading(); |
| | | var _sbSqlWhere = UtilityHelper.GetSearchWhere(_filterList); |
| | | var pgq = new PageQueryModel(curPage, this.pageBar1.RowsCount, "CREATE_TIME", |
| | | "asc", "", _sbSqlWhere.ToString()); |
| | | var json = JsonConvert.SerializeObject(pgq); |
| | | try |
| | | { |
| | | var strReturn = |
| | | UtilityHelper.HttpPost("", "User/GetListPage", json); |
| | | await UtilityHelper.HttpPostAsync("", "User/GetListPage", json); |
| | | var dd = UtilityHelper.ReturnToTablePage(strReturn); |
| | | var dt = dd.rtnData.list; |
| | | if (dd.rtnCode > 0) |
| | | { |
| | | DataTable dt = dd.rtnData.list; |
| | | gcMain.BindingContext = new BindingContext(); |
| | | gridView1.ColumnFilterChanged -= GridView1_ColumnFilterChanged; |
| | | if (dt.Rows.Count > 0) |
| | | { |
| | | gcMain.DataSource = dt; |
| | | gcMain.ForceInitialize(); |
| | | var dddd = dd.rtnData.pages; //总页 |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | } |
| | | else |
| | | UtilityHelper.SetDefaultTable(gcMain, gridView1); |
| | | gridView1.ColumnFilterChanged += GridView1_ColumnFilterChanged; |
| | | pageBar1.TotalPages = dd.rtnData.pages;//总页 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | pageBar1.RecordCount = dd.rtnData.total;//总记录数 |
| | | } |
| | | else |
| | | { |
| | | ToolBox.MsgHelper.ShowError("提示:" + dd.rtnMsg); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | MsgHelper.Warning("提示:" + ex.Message); |
| | | } |
| | | _loading.Close(); |
| | | } |
| | | |
| | | private void getModel(string strGuid, bool isEdit, int tabIdx) |
| | |
| | | MsgHelper.Warning("请先选择你要操作的行!"); |
| | | return; |
| | | } |
| | | |
| | | UtilityHelper.JumpToTab(xtraTabControl1, tabIdx); |
| | | var _obj = new |
| | | { |
| | |
| | | : using a System.ComponentModel.TypeConverter |
| | | : and then encoded with base64 encoding. |
| | | --> |
| | | <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" id="root" |
| | | xmlns=""> |
| | | <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> |
| | | <xsd:import namespace="http://www.w3.org/XML/1998/namespace"/> |
| | | <xsd:element name="root" msdata:IsDataSet="true"> |
| | | <xsd:complexType> |
| | |
| | | <xsd:element name="metadata"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0"/> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" use="required" |
| | | type="xsd:string"/> |
| | | <xsd:attribute name="name" use="required" type="xsd:string" /> |
| | | <xsd:attribute name="type" type="xsd:string"/> |
| | | <xsd:attribute name="mimetype" type="xsd:string"/> |
| | | <xsd:attribute ref="xml:space"/> |
| | |
| | | <xsd:element name="data"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="1"/> |
| | | <xsd:element name="comment" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="2"/> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" |
| | | use="required" msdata:Ordinal="1"/> |
| | | <xsd:attribute name="type" type="xsd:string" |
| | | msdata:Ordinal="3"/> |
| | | <xsd:attribute name="mimetype" type="xsd:string" |
| | | msdata:Ordinal="4"/> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" /> |
| | | <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> |
| | | <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> |
| | | <xsd:attribute ref="xml:space"/> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | <xsd:element name="resheader"> |
| | | <xsd:complexType> |
| | | <xsd:sequence> |
| | | <xsd:element name="value" type="xsd:string" |
| | | minOccurs="0" msdata:Ordinal="1"/> |
| | | <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> |
| | | </xsd:sequence> |
| | | <xsd:attribute name="name" type="xsd:string" |
| | | use="required"/> |
| | | <xsd:attribute name="name" type="xsd:string" use="required" /> |
| | | </xsd:complexType> |
| | | </xsd:element> |
| | | </xsd:choice> |
| | |
| | | <value>2.0</value> |
| | | </resheader> |
| | | <resheader name="reader"> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, |
| | | Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 |
| | | </value> |
| | | <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <resheader name="writer"> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, |
| | | Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 |
| | | </value> |
| | | <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> |
| | | </resheader> |
| | | <assembly alias="System.Drawing" |
| | | name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"/> |
| | | <data name="editorButtonImageOptions6.Image" |
| | | type="System.Drawing.Bitmap, System.Drawing" |
| | | mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> |
| | | <data name="editorButtonImageOptions2.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> |
| | | <value> |
| | | iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAACp0RVh0VGl0 |
| | | bGUAQ29udGFjdDtDYXJkO0luZm87RGV0YWlsO1BlcnNvbjtFZGl04bGTWAAAAtlJREFUOE+Nk1lIVFEA |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 38); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1344, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1231, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1346, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1126, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(1363, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | gridView1.OptionsFilter.AllowAutoFilterConditionChange = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsFilter.AllowFilterEditor = false; |
| | | gridView1.OptionsFilter.ShowCustomFunctions = DevExpress.Utils.DefaultBoolean.False; |
| | | gridView1.OptionsCustomization.AllowFilter = false; |
| | | gridView1.OptionsFind.ShowSearchNavButtons = false; |
| | | gridView1.OptionsView.ShowAutoFilterRow = true; |
| | | gridView1.OptionsView.ShowGroupPanel = false; |
| | | gridView1.IndicatorWidth = 50; |
| | | gridView1.CustomDrawRowIndicator += (s, e) => |
| | | { |
| | | if (e.Info.IsRowIndicator && e.RowHandle >= 0) |
| | | e.Info.DisplayText = (e.RowHandle + 1).ToString(); |
| | | }; |
| | | gridView1.CustomDrawEmptyForeground += (s, e) => |
| | | { |
| | | var str = "暂未查找到匹配的数据!"; |
| | | var f = new Font("微软雅黑", 16); |
| | | var r = new Rectangle(gridView1.GridControl.Width / 2 - 100, |
| | | e.Bounds.Top + 45, e.Bounds.Right - 5, e.Bounds.Height - 5); |
| | | e.Graphics.DrawString(str, f, Brushes.Gray, r); |
| | | }; |
| | | |
| | | } |
| | | #endregion |
| | | |
| | |
| | | Regex regex = new Regex("^[0-9]+$"); |
| | | return regex.IsMatch(str); |
| | | } |
| | | |
| | | |
| | | public static void SetValidatingEditor(object sender, BaseContainerValidateEditorEventArgs e) |
| | | { |
| | | //yz_quantity_0 |
| | | GridView view = sender as GridView; |
| | | if (view.FocusedColumn.Tag != null && view.FocusedColumn.Tag.ToString().StartsWith("yz_")) |
| | | { |
| | | string[] _ary = view.FocusedColumn.Tag.ToString().Split('_'); |
| | | if (_ary.Length > 2) |
| | | { |
| | | if (_ary[2] == "0") |
| | | { |
| | | double price = 0; if (!Double.TryParse(e.Value as String, out price)) |
| | | { e.Valid = false; e.ErrorText = "请输入正确的数字."; } |
| | | return; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /// <summary> |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(984, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(984, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(984, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | catch (Exception ex) |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(984, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 5, 3, 5); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(984, 39); |
| | | this.pageBar1.TabIndex = 3; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total; //记录总数 |
| | | pageBar1.CurrentPage = curPage; //当前页 |
| | | pageBar1.RowsCount = pageSize; //每页显示 |
| | | |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | |
| | | this.pageBar1.Margin = new System.Windows.Forms.Padding(3, 6, 3, 6); |
| | | this.pageBar1.Name = "pageBar1"; |
| | | this.pageBar1.RecordCount = 0; |
| | | this.pageBar1.RowsCount = 50; |
| | | this.pageBar1.Size = new System.Drawing.Size(933, 47); |
| | | this.pageBar1.TabIndex = 4; |
| | | this.pageBar1.TotalPages = 0; |
| | |
| | | pageBar1.TotalPages = dddd; |
| | | pageBar1.RecordCount = dd.rtnData.total;//记录总数 |
| | | pageBar1.CurrentPage = curPage;//当前页 |
| | | pageBar1.RowsCount = pageSize;//每页显示 |
| | | pageBar1.setTxt(); |
| | | } |
| | | else |
| | |
| | | private void cbxRowCount_SelectedIndexChanged(object sender, |
| | | EventArgs e) |
| | | { |
| | | RowsCount = Convert.ToInt32(cbxRowCount.Text); |
| | | int _RowsCount = Convert.ToInt32(cbxRowCount.Text); |
| | | CurrentPage = 1; |
| | | if (PagerEvent != null) |
| | | if (RecordCount > 0 && RowsCount>0) |
| | | if (_RowsCount > 0 && _RowsCount > 0) |
| | | BtnEvents(sender, e); |
| | | } |
| | | |
| | |
| | | /// <summary> |
| | | /// 每页条数 |
| | | /// </summary> |
| | | public int RowsCount { get; set; } |
| | | public int RowsCount { get { return int.Parse(this.cbxRowCount.Text); } } |
| | | |
| | | |
| | | int _RecordCount; |