private void InitGrid() { #region 表格属性设定 OrderGV = new SSITGridView <MMInOrder>(); OrderGV.Dock = DockStyle.Fill; OrderGV.AllowDeleteRow = false; OrderGV.AllowAddNewRow = false; OrderGV.AllowEditRow = false; OrderGV.AllowToolBar = true; OrderGV.AllowBottomToolBar = true; OrderGV.AllowBottomToolBarFilter = false; OrderGV.AllowDragToGroup = false; OrderGV.AllowPaging = false; OrderGV.MultiSelect = false; OrderGV.AllowCheckedColumn = false; #endregion #region 表格事件 //过滤: OrderGV.GridFilterMode = FilterMode.None; OrderGV.StyleChanged += OrderGV_StyleChanged; OrderGV.CellFormatting += OrderGV_CellFormatting; #endregion OrderGV.InitColumns(); //GV.AllowEditColumns(); OrderGV.FillGrid(GetDatas()); GridPanel.Controls.Add(OrderGV); }
public CheckDataInputForm(CheckOrder order) { //test //order.CheckOrderState = CheckOrderStateEnum.Submit; _sampleOrder = order; InitializeComponent(); _Grid = new SSITGridView <CheckOrder>() { Dock = DockStyle.Fill, MultiSelect = true, AllowDeleteRow = false, AllowAddNewRow = false, AllowEditRow = false, AllowToolBar = true, AllowBottomToolBar = false, AllowBottomToolBarFilter = false, AllowDragToGroup = false, AllowPaging = false, GridFilterMode = FilterMode.CustomFilter }; _Grid.ToolBar.Visible = false; twSampleOrder.Controls.Add(_Grid); EncodeCollection <CheckOrder> ec = new EncodeCollection <CheckOrder>(); ec.Add(order); _Grid.FillGrid(ec); //_sampleOrderGrid.SetGrid(ec); tsbSampleCount.Text = order.CheckQuantity.ToString(); tsbNote.Text = order.Note; LoadImage(order.SampleID); LoadInfo(); }
void checkQueryControl1_QueryReturnData(EncodeCollection <IEncode> datas) { EncodeCollection <CheckOrder> ec = new EncodeCollection <CheckOrder>(); foreach (CheckOrder item in datas) { ec.Add(item); } OrderGV.FillGrid(ec); }
private void InitGrid() { #region 表格属性设定 OrderGV = new SSITGridView <CheckOrder>(); OrderGV.Dock = DockStyle.Fill; OrderGV.AllowDeleteRow = false; OrderGV.AllowAddNewRow = false; OrderGV.AllowEditRow = false; OrderGV.AllowToolBar = true; OrderGV.AllowBottomToolBar = true; OrderGV.AllowBottomToolBarFilter = false; OrderGV.AllowDragToGroup = false; OrderGV.AllowPaging = false; OrderGV.MultiSelect = false; OrderGV.AllowCheckedColumn = false; #endregion #region 表格事件 //过滤: OrderGV.GridFilterMode = FilterMode.None; OrderGV.StyleChanged += OrderGV_StyleChanged; OrderGV.CellFormatting += OrderGV_CellFormatting; OrderGV.GridDbClick += OrderGV_GridDbClick; #endregion OrderGV.InitColumns(); //GV.AllowEditColumns(); var Query = new QueryHelper <CheckOrder>(); Query.Add("sampledate", DateTime.Now.Date.AddDays(-8).ToString(EncodeConst.DateTimeFormat), SSIT.DataField.Comparer.GreaterEqual); Query.Add("sampledate", DateTime.Now.Date.AddDays(1).ToString(EncodeConst.DateTimeFormat), SSIT.DataField.Comparer.Less); string[] StateNames = new string[] { SampleTypeEnum.PackagesComming.GetDescription() }; Query.Add <SampleTypeEnum>("sampletype", StateNames); var str = Query.GetSQLCondition(); var ec = Query.GetDatas(); OrderGV.FillGrid(ec); GridPanel.Controls.Add(OrderGV); }