示例#1
0
文件: FormScan.cs 项目: wjn99wjn/CTDB
        /// <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/browser</summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        /// <param name="rowIndex">要显示的选中的rowid, -1 </param>
        private void refreshdata(object sender, EventArgs e, int rowIndex = -1)
        {
            dataGridView1.DataSource = null;

            dataGridView1.DataSource = FormLogin.LoadDataF("tbSpecies");
            FormLogin.SetColumn(dataGridView1, "species_id|species_latin|species_Order|species_Family|species_CHN|species_note");

            CTHelper.SetRowIndex(dataGridView1, rowIndex);
            cspeciesNote.Focus();
        }
示例#3
0
文件: FormRef.cs 项目: wjn99wjn/CTDB
        //load/browser
        private void refreshdata(object sender, EventArgs e, int rowid = -1)
        {
            dataGridView1.DataSource = null;

            dataGridView1.DataSource = FormLogin.LoadDataF("tbRef");
            FormLogin.SetColumn(dataGridView1, "ref_id|year|cite|url");

            CTHelper.SetRowIndex(dataGridView1, rowid);

            if (dataGridView1.Rows.Count > 0)
            {
                dataGridView1.FirstDisplayedScrollingRowIndex = dataGridView1.RowCount - 1;
            }
        }
示例#4
0
        private void CTDBFormSpecimen_Load(object sender, EventArgs e)
        {
            //load controls
            ucFileInfo1.ParaTable = "ctdb-specimen";
            CTHelper.setControlTag(csmSex, 43, 42);
            CTHelper.setControlTag(csmAge, 45, 144);
            CTHelper.setControlTag(csmDehydrant, 63, 64);
            CTHelper.setControlTag(csmPS, 95, 96);
            //load gridview-specimen information


            //this.dataGridView1.AutoGenerateColumns = false;

            CTDBEntities ct = new CTDBEntities();

            csmSpecies.DataSource    = FormLogin.LoadDataF("tbSpecies");
            csmSpecies.DisplayMember = "species_note";
            //csmSpecies.DisplayMember = "species_latin";

            refreshdata();
        }
示例#5
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");
        }