Beispiel #1
0
 public void AddAwardMany(AwardEntity[] awards)
 {
     using (TMAwardEntities context = new TMAwardEntities())
     {
         foreach (var q in awards)
         {
             var item = new TmpAward();
             item.TicketNO = q.TicketNO;
             item.Level = q.Level;
             item.Remark = q.Remark;
             item.UpdateTime = DateTime.Now;
             context.AddToTmpAward(item);
         }
         context.SaveChanges();
     }
 }
Beispiel #2
0
        public AwardEntity[] GenerateAward(string belongTo)
        {
            //var machine = DataContext.BuildAwardMachine();
            //machine.BelongTo = belongTo;
            //var ongoing = machine.GenerateAwardByPlan();
            //DataContext.Update(machine.Award);

            //var result = DataContext.BuildAwardEntity(ongoing);
            //return result;
            AwardEntity[] result=new AwardEntity[0];
            return result;
        }