protected override void Dispose(bool disposing) { if (disposing) { db.Dispose(); } base.Dispose(disposing); }
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); }
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); }