public static void BuildTableRow(HtmlTable table, TmpAward item) { var tr = new HtmlTableRow(); var cell = new HtmlTableCell(); cell.InnerText = item.TicketNO; tr.Cells.Add(cell); table.Rows.Add(tr); }
public void AddAward(string ticketNO, string level, string remark) { using (TMAwardEntities context = new TMAwardEntities()) { var item =new TmpAward(); item.TicketNO = ticketNO; item.Level = level; item.Remark = remark; item.UpdateTime = DateTime.Now; context.AddToTmpAward(item); context.SaveChanges(); } }
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(); } }