Example #1
0
 public int ReturnRealtorIDOnCase(int ID)
 {
     using (var database = new EstateBrokerContext())
     {
         Database.Case tempCase = database.Cases.Find(ID);
         return(tempCase.RealtorID);
     }
 }
Example #2
0
 public bool UpdateCase(int ID, DateTime creationDate, DateTime?closedDate, double price, int realtorID)
 {
     try
     {
         using (var database = new EstateBrokerContext())
         {
             Database.Case workingCase = database.Cases.Find(ID);
             workingCase.CreationDate = creationDate;
             workingCase.ClosedDate   = closedDate;
             workingCase.Price        = price;
             workingCase.RealtorID    = realtorID;
             database.SaveChanges();
         }
         return(true);
     }
     catch
     {
         return(false);
     }
 }