public void Delete(SAbroad sAbroad) { DataOperation dataOperation = new DataOperation(); string sql = "delete from TB_SAbroad where id in ('" + sAbroad.Id + "')"; dataOperation.DeleteRecord(sql); }
public void Insert(SAbroad sAbroad) { DataOperation dataOperation = new DataOperation(); string sql = "select * from TB_SAbroad where id in ('" + sAbroad.Id + "')"; DataTable tb = dataOperation.GetOneDataTable_sql(sql); if (tb.Rows.Count > 0) { dataOperation.Update1(sAbroad); } else { dataOperation.Insert1(sAbroad); } }