Esempio n. 1
0
 public static bool UpdateCustomer(CUSTOMER customer)
 {
     try
     {
         ctx.Entry(customer).State = System.Data.EntityState.Modified;
         ctx.SaveChanges();
     }
     catch (Exception e)
     {
         System.Diagnostics.Debug.WriteLine(e);
         return false;
     }
     return true;
 }
Esempio n. 2
0
 public static NOTE_SHARABLE[] GetNoteSharableByCustomer(CUSTOMER customer)
 {
     NOTE_SHARABLE[] notes = null;
     using (CloudEDUEntities ctx = new CloudEDUEntities())
     {
         notes = ctx.NOTE_SHARABLE.Where(n => n.CUSTOMER_ID == customer.ID).ToArray();
     }
     return notes;
 }
Esempio n. 3
0
 public static COMMENT[] GetCommentsByCustomer(CUSTOMER customer)
 {
     COMMENT[] comments = null;
     using (CloudEDUEntities ctx = new CloudEDUEntities())
     {
         comments = ctx.COMMENTs.Where(c => c.CUSTOMER_ID == customer.ID).ToArray();
     }
     return comments;
 }