public static bool Delete(int id, string curentUsername, string role)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         HDS_User obj = exMana.HDS_User.First(temp => temp.Usr_ID == id);
         if (curentUsername == obj.Usr_Username)
         {
             errMsg = "You can't to delete yourself !";
             return false;
         }
         if (!role.Equals("AdmExastExaor") || !role.Equals("Manager"))
         {
             errMsg = "You don't permission to delete this user !";
             return false;
         }
         exMana.DeleteObject(obj);
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }
 public static bool Delete(int id, string role)
 {
     try
     {
         ExamSystemManagerDBEntities exMana = new ExamSystemManagerDBEntities();
         HDS_StandardRating obj = exMana.HDS_StandardRating.First(temp => temp.Rat_ID == id);
         if (!role.Equals("AdmRatstrator") || !role.Equals("Manager"))
         {
             errMsg = "You don't permission to delete this user !";
             return false;
         }
         exMana.DeleteObject(obj);
         exMana.SaveChanges();
     }
     catch (Exception e)
     {
         errMsg = e.Message;
         return false;
     }
     errMsg = "";
     return true;
 }