public void DeleteByID(int ID) { OleDbHelper.ExecuteNonQuery("Main", "delete from 处理策略 where 序号=@ID", new OleDbParameter("@ID", ID)); }
/// <summary> /// 获取处理策略资料 /// </summary> /// <param name="account"></param> /// <returns></returns> public DataTable GetStrategiesDataTable(string account) { DataTable dt = OleDbHelper.ExecuteDataTable("Main", "select * from 处理策略"); return(dt); }
public void DeleteByID(int id) { OleDbHelper.ExecuteNonQuery("Main", "delete from [用户资料] where [序号]=@ID", new OleDbParameter("@ID", id)); }
public DataTable GetEventTable(string tableName) { DataTable table = OleDbHelper.ExecuteDataTable("Event", "select * from " + tableName); return(table); }
//public DataTable GetEventsDataTable(string DBName, string tableName, int pageSize, int pageIndex) //{ // dataPage.PageSize = pageSize; // dataPage.TableName = tableName; // dataPage.PageIndex = pageIndex; // dataPage.QueryFieldName = " 序号,报警时间,用户名称,用户地址,主机编号,用户类型,主机类型,分区编号,防区编号,防区类型,探测器型号,安装位置,事件类型,辅助信息,归类处理,通讯代码,处理内容,值班员姓名,事件字体颜色,事件背景颜色,来电号码,站点编号,二级站点 "; // dataPage.OrderStr = "[序号]"; // dataPage.PrimaryKey = "[序号]"; // DataTable table = dataPage.QueryDataTable(DBName); // pageCount = dataPage.PageCount; // return table; //} public DataTable GetEventsDataTable(string dbName, string tableName, string queryFieldName) { DataTable dt = OleDbHelper.ExecuteDataTable(dbName, "select " + queryFieldName + " from " + tableName + " order by [报警时间] desc"); return(dt); }