private static bool CheckInput(cNhomNhanVienDO Group)
 {
     if (Group.TENNHOMNHANVIEN == "")
     {
         XtraMessageBox.Show("Vui lòng nhập tên nhóm nhân viên!");
         return false;
     }
     return true;
 }
 public static string GetNameByGroupID(string ID)
 {
     ID = ID.ToLower();
     cNhomNhanVienDO group = new cNhomNhanVienDO();
     using (DB_HMS_Entities lst = new DB_HMS_Entities())
     {
         var query = from u in lst.tbNHOMNGUOIDUNGs where u.MANHOMNDN == ID select u;
         foreach (var row in query)
         {
             group.TENNHOMNHANVIEN = row.TENNHOMND;
         }
     }
     return group.TENNHOMNHANVIEN;
 }
 public static string GetIDByGroupName(string Name)
 {
     Name = Name.ToLower();
     cNhomNhanVienDO group = new cNhomNhanVienDO();
     using (DB_HMS_Entities lst = new DB_HMS_Entities())
     {
         var query = from u in lst.tbNHOMNGUOIDUNGs where u.TENNHOMND == Name select u;
         foreach (var row in query)
         {
             group.MANHOMNHANVIEN = row.MANHOMNDN;
         }
     }
     return group.MANHOMNHANVIEN;
 }
        public cNhomNhanVienDO GetStaffGroupInfor()
        {
            cNhomNhanVienDO Gr = new cNhomNhanVienDO();

            Gr.TENNHOMNHANVIEN = CheckName(txtTenNhom.Text).Trim();
            Gr.MANHOMNHANVIEN = txtMaNhom.Text;
            Gr.MOTA = txtMota.Text;
            if (chkTrangthai.Checked == true)
            {
                Gr.TRANGTHAI = true;
            }
            else
            {
                Gr.TRANGTHAI = false;
            }
            return Gr;
        }
 public static List<cNhomNhanVienDO> GetStaffGroupList()
 {
     List<cNhomNhanVienDO> GroupList = new List<cNhomNhanVienDO>();
     using (DB_HMS_Entities lst = new DB_HMS_Entities())
     {
         var query = from u in lst.tbNHOMNGUOIDUNGs select u;
         foreach (var row in query)
         {
             cNhomNhanVienDO ds = new cNhomNhanVienDO();
             ds.MANHOMNHANVIEN = row.MANHOMNDN;
             ds.TENNHOMNHANVIEN = row.TENNHOMND;
             ds.MOTA = row.MOTA;
             ds.TRANGTHAI = row.TRANGTHAI.Value;
             GroupList.Add(ds);
         }
         return GroupList;
     }
 }