예제 #1
0
 private void Query(string strw)
 {
     try
     {
         DataSet ds = new DataSet();
         ds = bll.GetList(strw);
         //grid
         gridControl1.Dock = DockStyle.Fill;
         gridControl1.DataSource = ds.Tables[0];
         gridView1.Columns.Clear();
         ComFunc comfun = new ComFunc();
         comfun.dgvstyle(gridView1, 0, "ID", "序号", 5, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
         comfun.dgvstyle(gridView1, 1, "TYPE_CODE", "编码", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
         comfun.dgvstyle(gridView1, 2, "TYPE_NAME", "名称", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
         comfun.dgvstyle(gridView1, 3, "HELP_CODE", "助记符", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
         comfun.dgvstyle(gridView1, 4, "CREATE_DATE", "创建时间", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
         comfun.dgvstyle(gridView1, 5, "CREATE_BY", "创建人", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     }
     catch (Exception e)
     {
         MessageBox.Show(e.ToString());
     }
 }
예제 #2
0
 private void Query(string strw)
 {
     DataSet ds = new DataSet();
     ds = bll.GetList(strw);
     //grid
     gridControl1.DataSource = ds.Tables[0];
     gridView1.Columns.Clear();
     ComFunc comfun = new ComFunc();
     comfun.dgvstyle(gridView1, 0, "ID", "序号", 5, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 1, "DEPT_CODE", "科室编码", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 2, "DEPT_NAME", "科室名称", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 3, "HELP_CODE", "助记符", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 4, "DEPT_TYPE", "科室类型", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 5, "HOSPITAl_CODE", "所属医院", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 6, "CREATE_DATE", "创建时间", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
     comfun.dgvstyle(gridView1, 7, "CREATE_BY", "创建人", 15, true, true, DevExpress.Utils.HorzAlignment.Center, DevExpress.XtraGrid.Columns.FixedStyle.Left, true);
 }