コード例 #1
0
 //Create
 public Order Insert(Order order)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Order.Add(order);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #2
0
 //Create
 public CPAStage Insert(CPAStage cpastage)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CPAStage.Add(cpastage);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #3
0
 //Create
 public Category Insert(Category category)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Category.Add(category);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #4
0
 //Create
 public Category Insert(Category category)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Category.Add(category);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #5
0
 //Create
 public Order Insert(Order order)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Order.Add(order);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #6
0
 //Create
 public CPAStage Insert(CPAStage cpastage)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CPAStage.Add(cpastage);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #7
0
ファイル: CPA.cs プロジェクト: RowenNaidoo/OrderTrackAngular
 //Create
 public CPA Insert(CPA cpa)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CPA.Add(cpa);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #8
0
 //Create
 public CartItem Insert(CartItem cartitem)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CartItem.Add(cartitem);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #9
0
 //Create
 public Item Insert(Item item)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Item.Add(item);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #10
0
 //Create
 public AppUser Insert(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.AppUser.Add(appuser);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #11
0
 //Create
 public AppUser Insert(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.AppUser.Add(appuser);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #12
0
ファイル: Item.cs プロジェクト: RowenNaidoo/OrderTrackAngular
 //Create
 public Item Insert(Item item)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.Item.Add(item);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #13
0
 //Create
 public CPA Insert(CPA cpa)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CPA.Add(cpa);
         ctx.SaveChanges();
         return(this);
     }
 }
コード例 #14
0
 //Update
 public CPAStage Update(CPAStage cpastage)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == this.CPAStageID);
         CPAStage = cpastage;
         ctx.SaveChanges();
         return CPAStage;
     }
 }
コード例 #15
0
 //Update
 public Category Update(Category category)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Category Category = ctx.Category.First(x => x.CategoryID == this.CategoryID);
         Category = category;
         ctx.SaveChanges();
         return(Category);
     }
 }
コード例 #16
0
 //Update
 public CartItem Update(CartItem cartitem)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == this.CartItemID);
         CartItem = cartitem;
         ctx.SaveChanges();
         return(CartItem);
     }
 }
コード例 #17
0
 //Update
 public Item Update(Item item)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Item Item = ctx.Item.First(x => x.ItemID == this.ItemID);
         Item = item;
         ctx.SaveChanges();
         return(Item);
     }
 }
コード例 #18
0
ファイル: Item.cs プロジェクト: RowenNaidoo/OrderTrackAngular
 //Update
 public Item Update(Item item)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Item Item = ctx.Item.First(x => x.ItemID == this.ItemID);
         Item = item;
         ctx.SaveChanges();
         return Item;
     }
 }
コード例 #19
0
 //Update
 public CPA Update(CPA cpa)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CPA CPA = ctx.CPA.First(x => x.CPAID == this.CPAID);
         CPA = cpa;
         ctx.SaveChanges();
         return(CPA);
     }
 }
コード例 #20
0
ファイル: CPA.cs プロジェクト: RowenNaidoo/OrderTrackAngular
 //Update
 public CPA Update(CPA cpa)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CPA CPA = ctx.CPA.First(x => x.CPAID == this.CPAID);
         CPA = cpa;
         ctx.SaveChanges();
         return CPA;
     }
 }
コード例 #21
0
 //Update
 public AppUser Update(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == this.AppUserID);
         AppUser = appuser;
         ctx.SaveChanges();
         return(AppUser);
     }
 }
コード例 #22
0
 //Update
 public Order Update(Order order)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Order Order = ctx.Order.First(x => x.OrderID == this.OrderID);
         Order = order;
         ctx.SaveChanges();
         return(Order);
     }
 }
コード例 #23
0
 //Update
 public Order Update(Order order)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Order Order = ctx.Order.First(x => x.OrderID == this.OrderID);
         Order = order;
         ctx.SaveChanges();
         return Order;
     }
 }
コード例 #24
0
 //Update
 public Category Update(Category category)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         Category Category = ctx.Category.First(x => x.CategoryID == this.CategoryID);
         Category = category;
         ctx.SaveChanges();
         return Category;
     }
 }
コード例 #25
0
 //Update
 public CPAStage Update(CPAStage cpastage)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == this.CPAStageID);
         CPAStage = cpastage;
         ctx.SaveChanges();
         return(CPAStage);
     }
 }
コード例 #26
0
 //Update
 public AppUser Update(AppUser appuser)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == this.AppUserID);
         AppUser = appuser;
         ctx.SaveChanges();
         return AppUser;
     }
 }
コード例 #27
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         try
         {
             CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == id);
             ctx.CartItem.Remove(CartItem);
             ctx.SaveChanges();
             return(true);
         }
         catch (Exception ex)
         {
             return(false);
         }
     }
 }
コード例 #28
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         try
         {
             AppUser AppUser = ctx.AppUser.First(x => x.AppUserID == id);
             ctx.AppUser.Remove(AppUser);
             ctx.SaveChanges();
             return(true);
         }
         catch (Exception ex)
         {
             return(false);
         }
     }
 }
コード例 #29
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using(OrderTrackEntities ctx= new OrderTrackEntities())
     {
         try
         {
             Order Order = ctx.Order.First(x => x.OrderID == id);
             ctx.Order.Remove(Order);
             ctx.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
         }
     }
 }
コード例 #30
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         try
         {
             CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == id);
             ctx.CPAStage.Remove(CPAStage);
             ctx.SaveChanges();
             return(true);
         }
         catch (Exception ex)
         {
             return(false);
         }
     }
 }
コード例 #31
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using(OrderTrackEntities ctx= new OrderTrackEntities())
     {
         try
         {
             Category Category = ctx.Category.First(x => x.CategoryID == id);
             ctx.Category.Remove(Category);
             ctx.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
         }
     }
 }
コード例 #32
0
 //Delete By ID
 public Boolean Delete(long id)
 {
     using(OrderTrackEntities ctx= new OrderTrackEntities())
     {
         try
         {
             CPAStage CPAStage = ctx.CPAStage.First(x => x.CPAStageID == id);
             ctx.CPAStage.Remove(CPAStage);
             ctx.SaveChanges();
             return true;
         }
         catch (Exception ex)
         {
             return false;
         }
     }
 }
コード例 #33
0
 //Create
 public CartItem Insert(CartItem cartitem)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         ctx.CartItem.Add(cartitem);
         ctx.SaveChanges();
         return this;
     }
 }
コード例 #34
0
 //Update
 public CartItem Update(CartItem cartitem)
 {
     using (OrderTrackEntities ctx = new OrderTrackEntities())
     {
         CartItem CartItem = ctx.CartItem.First(x => x.CartItemID == this.CartItemID);
         CartItem = cartitem;
         ctx.SaveChanges();
         return CartItem;
     }
 }