Пример #1
0
        void RefreshGrid()
        {
            _grid.Fields = FieldSelectSettings <CheckData> .Instance.Fields.ToDescriptionList();

            _grid.Init();
            _grid.SetGrid(_grid.Encodes);
        }
Пример #2
0
        public CheckItemSelectForm(string lotid)
        {
            InitializeComponent();
            sampleGrid      = new ObjectGrid <CheckOrder>();
            sampleGrid.Dock = DockStyle.Fill;
            radPanel1.Controls.Add(sampleGrid);
            sampleGrid.SelectedChanged        += sampleGrid_SelectedChanged;
            sampleGrid.Selection.SelectionMode = SourceGrid.GridSelectionMode.Row;
            string clause = string.Format("lotid like '%{0}%' and ( sampleitemstate = {1} or sampleitemstate = {2})", lotid, (int)CheckOrderStateEnum.Complete, (int)CheckOrderStateEnum.Approve);
            var    ec     = Encode.EncodeData.GetDatas <CheckOrder>(clause, "sampleid desc", 20);

            sampleGrid.Fields = FieldSelectSettings <CheckOrder> .Instance.Fields.ToDescriptionList();

            sampleGrid.Init();
            sampleGrid.SetGrid(ec);
        }
Пример #3
0
        public CheckDataCopyForm(EncodeCollection <CheckOrder> ec)
        {
            //test
            //order.SampleOrderState = SampleOrderStateEnum.Submit;
            _sampleOrder = ec[0];

            InitializeComponent();
            _sampleOrderGrid = new ObjectGrid <CheckOrder> {
                Dock = DockStyle.Fill
            };
            _sampleOrderGrid.Fields = FieldSelectSettings <CheckOrder> .Instance.Fields.ToDescriptionList();

            _sampleOrderGrid.Init();
            panel1.Controls.Add(_sampleOrderGrid);

            _sampleOrderGrid.SetGrid(ec);
            _sampleOrderGrid.SelectedChanged += OnSampleSelectedChanged;
            //tsbSampleCount.Text = _sampleOrder.SampleQuantity.ToString();
            //tsbNote.Text = _sampleOrder.Note;
            _sampleOrderGrid.SelectedRow = 0;
            LoadInfo();
        }