Пример #1
0
        /// <summary>load/ refresh </summary>
        private void refreshdata(object sender, EventArgs e, int rowIndex = -1)
        {
            CTDBEntities ct = new CTDBEntities();

            cscEquipment.DataSource    = ct.tbEquipment.ToList <tbEquipment>();
            cscEquipment.DisplayMember = "e_nameA";

            cscSpecimen.DataSource    = FormLogin.LoadDataA("tbSpecimen");
            cscSpecimen.DisplayMember = "Abstract";

            cscRef.DataSource    = FormLogin.LoadDataF("tbRef");
            cscRef.DisplayMember = "cite";
            cscRef.SelectedIndex = 3;

            FormLogin.LoadData(dataGridView1, "tbScan", "scan_id|e_id|sp_id|Abstract|scan_para_FilesNumber|UserId");

            if (dataGridView1.DataSource != null)
            {
                if (rowIndex > 0)
                {
                    dataGridView1.FirstDisplayedScrollingRowIndex = rowIndex;
                    dataGridView1.Rows[rowIndex].Selected         = true;
                }
            }
        }
Пример #2
0
        /// <summary>load/ refresh </summary>
        private void refreshdata(int rowIndex = -1)
        {
            dataGridView1.DataSource = null;
            mitDelete.Enabled        = false;
            CTDBEntities ct = new CTDBEntities();

            //dataGridView1.DataSource = ct.tbSpecimen.ToList<tbSpecimen>();
            //dataGridView1.DataSource = FormLogin.LoadDataA("tbSpecimen");
            //SetColumn(dataGridView1, "sp_id|species_id");
            FormLogin.LoadData(dataGridView1, "tbSpecimen", "sp_id|species_id|sp_collector|Abstract|UserId");
            //dg.DataSource = FormLogin.LoadDataA(table);
            //SetColumn(dg, showcol);

            if (dataGridView1.DataSource != null)
            {
                if (rowIndex > 0)
                {
                    dataGridView1.Rows[rowIndex].Selected = true;
                }
            }
        }
Пример #3
0
        /// <summary>load/ refresh </summary>
        private void refreshdata(object sender, EventArgs e)
        {
            dataGridView1.DataSource = null;
            mitDelete.Enabled        = false;

            CTDBEntities ct = new CTDBEntities();

            //clScan.DataSource = ct.tbScan.ToList<tbScan>();
            clScan.DataSource    = FormLogin.LoadDataA("tbScan");
            clScan.DisplayMember = "Abstract";

            CTHelper.setControlTag(clOpenStatus, 31, 30);
            CTHelper.setControlTag(clFileType, 51, 55);
            CTHelper.setControlTag(clCutMethod, 37, 35);

            cscRef.DataSource    = FormLogin.LoadDataF("tbRef");
            cscRef.DisplayMember = "cite";
            cscRef.SelectedIndex = 3;

            //dataGridView1.DataSource = ct.tbSlice.ToList<tbSlice>();
            //dataGridView1.DataSource = FormLogin.LoadDataA("tbSlice");
            FormLogin.LoadData(dataGridView1, "tbSlice", "slice_id|scan_id|slice_para_PixelSize|slice_para_CutMethod|Abstract|date_in|open_status|slice_para_SliceNumber");
        }