예제 #1
0
        /// <summary>
        /// // get results from server using entity by pill's name framework (and measure time)
        /// </summary>
        /// <param name="pillName"></param>
        /// <returns></returns>
        private List <Prescription> ListResultsFromEFbyPillName(string pillName)
        {
            List <Prescription> pres;

            using (RedPillEntities entities = new RedPillEntities())
            {
                pres = entities.Prescriptions.Where(p => p.pillName.Equals(pillName)).ToList();
            }
            return(pres);
        }
예제 #2
0
 public static bool Login(string docID, string password)
 {
     using (RedPillEntities entities = new RedPillEntities())
     {
         var docsExist = entities.Doctors.Any(doctor => doctor.docID.ToLower().Equals(docID) &&
                                              doctor.password.Equals(password));
         //var docslist = docs.ToList();
         return(docsExist);
     }
 }