예제 #1
0
 public void MarkResolved(int issueId)
 {
     using (var context = new OrdersIssuesDataClassDataContext(_connectionString))
     {
         context.Issues.FirstOrDefault(i => i.Id == issueId).Resolved = true;
         context.SubmitChanges();
     }
 }
예제 #2
0
 public void MarkComplete(int OrderId)
 {
     using (var context = new OrdersIssuesDataClassDataContext(_connectionString))
     {
         context.Orders.FirstOrDefault(o => o.Id == OrderId).Completed = true;
         context.SubmitChanges();
     }
 }
예제 #3
0
 public void AddIssue(Issue issue)
 {
     using (var context = new OrdersIssuesDataClassDataContext(_connectionString))
     {
         context.Issues.InsertOnSubmit(issue);
         context.SubmitChanges();
     }
 }
예제 #4
0
 public void AddOrder(Order order)
 {
     order.Date = DateTime.Now;
     using (var context = new OrdersIssuesDataClassDataContext(_connectionString))
     {
         context.Orders.InsertOnSubmit(order);
         context.SubmitChanges();
     }
 }