protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         db.Dispose();
     }
     base.Dispose(disposing);
 }
Пример #2
0
        public static bool IsSupervisorSp(int idSP, string uName)
        {
            ePatriaDefault db = new ePatriaDefault();

            bool result = db.LetterOfCommands.Any(d => d.LetterOfCommandID == idSP && d.SupervisorID == uName);

            db.Dispose();

            return(result);
        }
Пример #3
0
        public static bool IsMemberSp(int idSP, string uName)
        {
            ePatriaDefault db = new ePatriaDefault();

            LetterOfCommand dbsp = db.LetterOfCommands.Where(d => d.LetterOfCommandID == idSP).FirstOrDefault();

            bool result = dbsp.MemberID.Split(';').Contains(uName);

            db.Dispose();

            return(result);
        }