Example #1
0
 public void loadData(DonVi donvi = null, Phong phong = null)
 {
     try
     {
         List <DonViHienThi> list    = DonViHienThi.Convert(DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten));
         DonViHienThi        objNULL = new DonViHienThi();
         objNULL.id  = Guid.Empty;
         objNULL.ten = "[Không có đơn vị]";
         list.Add(objNULL);
         ucTreeDonVi1.DataSource = list;
         //ucTreeDonVi1.DataSource = DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
         if (donvi != null)
         {
             ucTreeDonVi1.DonVi = donvi;
         }
         reloadData();
         if (phong != null)
         {
             ucGridControlTaiSan1.ExpandGroupRow(phong.ten);
         }
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData: " + ex.Message);
     }
 }
Example #2
0
        private void frmSuaPermission_Load(object sender, EventArgs e)
        {
            //Load ds hạng mục
            listBoxControl_quyenHangMuc.DataSource = Permission.ENTITY_LIST;

            //load ds quyền cố định
            listBoxControl_quyenCoDinh.DataSource = Permission.STAND_ALONE_LIST;

            //load ds quyền hiện có
            gridControl_DSQuyen.DataSource = input;

            //load ds donvi
            ucTreeDonVi1.DataSource = DonViHienThi.Convert(DonVi.getQuery());
        }
 public void loadData(DonVi donvi = null, Phong phong = null)
 {
     try
     {
         List<DonViHienThi> list = DonViHienThi.Convert(DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten));
         DonViHienThi objNULL = new DonViHienThi();
         objNULL.id = Guid.Empty;
         objNULL.ten = "[Không có đơn vị]";
         list.Add(objNULL);
         ucTreeDonVi1.DataSource = list;
         //ucTreeDonVi1.DataSource = DonVi.getQuery().OrderBy(c => c.parent_id).ThenBy(c => c.ten).ToList();
         if (donvi != null)
             ucTreeDonVi1.DonVi = donvi;
         reloadData();
         if (phong != null)
             ucGridControlTaiSan1.ExpandGroupRow(phong.ten);
     }
     catch (Exception ex)
     {
         Debug.WriteLine(this.Name + "->loadData: " + ex.Message);
     }
 }