Пример #1
0
 public static void Update(BonusSource o)
 {
     var obj = DC.BonusSources.SingleOrDefault(p => p.BonusSourceId == o.BonusSourceId);
     if (obj != null)
     {
         obj.BonusSourceName = o.BonusSourceName;
         obj.Description = o.Description;
     }
     DC.SubmitChanges();
 }
Пример #2
0
 public static BonusSource Insert(string name, string desc)
 {
     var o = new BonusSource()
     {
         BonusSourceName = name,
         Description = desc,
     };
     DC.BonusSources.InsertOnSubmit(o);
     DC.SubmitChanges();
     return o;
 }
Пример #3
0
 public static void Delete(BonusSource o)
 {
     Delete(o.BonusSourceId);
 }