Ejemplo n.º 1
0
 public void CreateMeeting(int organizorId, string email, string mobile, System.DateTime dateTime, string purpose)
 {
     using (var db = new VMSDbEntities())
     {
         db.spCreateMeeting(organizorId, email, mobile, dateTime, purpose);
     }
 }
Ejemplo n.º 2
0
 public bool UpdateMeeting(int id, MeetingState state, string email = null)
 {
     using (var db = new VMSDbEntities())
     {
         Random randomGenerator = new Random();
         var    otp             = state == MeetingState.Acknowledged ? randomGenerator.Next(100000, 999999) : -1;
         db.spUpdateMeeting(id, (int)state, email ?? string.Empty, otp);
     }
     return(true);
 }
Ejemplo n.º 3
0
 public Meeting GetMeeting(int id)
 {
     using (var db = new VMSDbEntities())
     {
         var meeting = db.Meetings
                       .Where(m => m.MeetingId == id)
                       .FirstOrDefault();
         meeting.Visitor = db.Visitors
                           .Where(v => v.VisitorId == meeting.VisitorId)
                           .FirstOrDefault();
         return(meeting);
     }
 }