protected override void DoJob() { MagazineDateRepository rep = new MagazineDateRepository(OpConn); string query = string.Format("INSERT INTO MagazineDate (MagazineId, Date) VALUES ({0}, '{1}')", obj.MagazineId, obj.Date.ToString("yyyy-MM-dd")); rep.BsExecute(query); }
protected override void DoJob() { MagazineDateRepository rep = new MagazineDateRepository(OpConn); string delete = string.Format("DELETE FROM Advertisement WHERE MagazineDateId = {0}", dateId); rep.BsExecute(delete); foreach (Advertisement item in list) { string query = string.Format("INSERT INTO Advertisement (MagazineDateId, CompanyId, PageId) VALUES ({0}, {1}, {2})", dateId, item.CompanyId, item.PageId); rep.BsExecute(query); } }
protected override void DoJob() { MagazineDateRepository rep = new MagazineDateRepository(OpConn); ObjList = rep.GetList(obj); }