Esempio n. 1
0
 public static void AddMedOrgToPacient(int userId, int MedOrganizationId)
 {
     using (var db = new LiteDatabase(@"EgovMedDB.db"))
     {
         var     collection = db.GetCollection <Pacient>("Pacient");
         Pacient p          = collection.FindOne(f => f.PacientId == userId);
         p.MedOrganizationId = MedOrganizationId;
         collection.Update(p);
     }
 }
Esempio n. 2
0
 public static bool AddPacient(Pacient pacient)
 {
     try
     {
         using (var db = new LiteDatabase(@"EgovMedDB.db"))
         {
             var collection = db.GetCollection <Pacient>("Pacient");
             collection.Insert(pacient);
         }
         return(true);
     }
     catch (Exception ex)
     {
         return(false);
     }
 }