コード例 #1
0
 partial void DeleteSalesPromotion(SalesPromotion instance);
コード例 #2
0
 partial void InsertSalesPromotion(SalesPromotion instance);
コード例 #3
0
 partial void UpdateSalesPromotion(SalesPromotion instance);
コード例 #4
0
 public int Insert(SalesPromotionModelShow item)
 {
     s26webDataContext db = new s26webDataContext();
     try
     {
         SalesPromotion new_item = new SalesPromotion
         {
             Code = item.Code,
             Name = item.Name,
             Point = item.Point,
             Deadline = item.Deadline,
             CreateTime = DateTime.UtcNow
         };
         db.SalesPromotion.InsertOnSubmit(new_item);
         db.SubmitChanges();
         db.Connection.Close();
         return new_item.Id;
     }
     catch
     {
         return -1;
     }
 }