public static int GetEveryAttendanceNumber(string department, string str1, string str2) { DataTable dt = ConnHelper.GetDataTable("select * from TabStudentAttendance where [StudentDepartment] = '" + department + "' and [CurrentWeek] = '" + str1 + "' and [AttendanceType] = '" + str2 + "' "); int i = dt.Rows.Count; return(i); }
public static DataTable GetDatatableBySQL(string TableName, string str1, string str1Limit, string str2, string str2Limt) { string strSQL = BuidSQLSelectString(TableName, str1, str1Limit, str2, str2Limt); return(ConnHelper.GetDataTable(strSQL)); }
public static DataTable GetDatatableBySQL(string str1, string str2, string str3) { string strTemp = BuidSQLSelectString(str1, str2, str3); return(ConnHelper.GetDataTable(strTemp)); }
//public static bool UpdataTable(string TableName,string UserPWD,string UserID) //{ //} /// <summary> /// 执行DAL层查询语句,并返回dataTable /// </summary> /// <param name="strSQl">要执行的Select语句</param> /// <returns>查询回来的数据</returns> public static DataTable GetDtBySQL(string strSQl) { return(ConnHelper.GetDataTable(strSQl)); }
public static DataTable GetDistinctColums(string BiaoMing, string LieMing)//获取不同行 { DataTable dt = ConnHelper.GetDataTable("select distinct " + LieMing + " from " + BiaoMing + ""); return(dt); }
public static DataTable GetDataTableBysql(string strsql) { return(ConnHelper.GetDataTable(strsql)); }
/// <summary> /// 查询指定表中的所有符合条件的数据 /// 接受两个约束参数 /// </summary> /// <param name="Tname">表名</param> /// <param name="dl">约束条件1</param> /// <param name="d2">约束条件2</param> /// <param name="content1">约束条件1的值</param> /// <param name="content2">约束条件2的值</param> /// <returns></returns> public static DataTable GetDTBySQL(string Tname, string dl, string d2, string content1, string content2) { string strSQL = SQLFactory.BuildSQLSelectString(Tname, dl, d2, content1, content2); return(ConnHelper.GetDataTable(strSQL)); }
/// <summary> /// 获取未读消息 /// </summary> /// <param name="v1">权限</param> /// <param name="v2">构造字段</param> /// <returns></returns> public static DataTable GetDT4Message(string v1, string v2) { string strSQL = (v2 == "")? "select * from TabMessage where role='" + v1 + "'" : "select * from TabMessage where role='" + v1 + "' and id not in " + v2; return(ConnHelper.GetDataTable(strSQL)); }
public static DataTable getDt(string sql) { string strSQL = sql; return(ConnHelper.GetDataTable(strSQL)); }
/// <summary> /// 查询指定表中的所有符合条件的数据 /// 接受五个约束参数 /// </summary> /// <param name="Tname">表名</param> /// <param name="v1">约束条件1</param> /// <param name="v2">约束条件2</param> /// <param name="v3">约束条件3</param> /// <param name="v4">约束条件4</param> /// <param name="v5">约束条件5</param> /// <param name="con1">约束条件值1</param> /// <param name="con2">约束条件值2</param> /// <param name="con3">约束条件值3</param> /// <param name="con4">约束条件值4</param> /// <param name="con5">约束条件值5</param> /// <returns></returns> public static DataTable GetDTBySQL(string Tname, string v1, string v2, string v3, string v4, string v5, string con1, string con2, string con3, string con4, string con5) { string strSQL = "select * from " + Tname + " where " + v1 + "='" + con1 + "' and " + v2 + "='" + con2 + "' and " + v3 + "='" + con3 + "' and " + v4 + "='" + con4 + "' and " + v5 + "='" + con5 + "'"; return(ConnHelper.GetDataTable(strSQL)); }
public static DataTable GetDT4Course(string v1, string v2, string con1, string con2) { string strSQL = "select DISTINCT week,time,course,area from TabCourses where is_attendance='未考勤' and " + v1 + "='" + con1 + "' and " + v2 + "='" + con2 + "'"; return(ConnHelper.GetDataTable(strSQL)); }
/// <summary> /// 查询一张表的所有数据 /// </summary> /// <param name="Tname">查询的表名</param> /// <returns></returns> public static DataTable GetDTBySQL(string Tname) { string strSQL = SQLFactory.BuildSQLSelectString(Tname); return(ConnHelper.GetDataTable(strSQL)); }
/// <summary> /// 获取教师部分信息,用于初始化的显示 /// </summary> /// <returns></returns> public static DataTable GetTeachersInfo() { return(ConnHelper.GetDataTable("select department,user_id,user_name,role from TabTeachers")); }
//获取原密码 public static DataTable GetOldPWD(string UserID) { return(ConnHelper.GetDataTable("select UserPWD from TabTeachers where UserID = '" + UserID + "'")); }
public static DataTable GetDataTableBysql(string TabName, string str1, string str2, string str3, string str4) { return(ConnHelper.GetDataTable("select * from " + TabName + " where " + str1 + " = '" + str2 + "' and " + str3 + " = '" + str4 + "'")); }
public static DataTable GetDataTableBysql(string TabName, string str1, int str2) { return(ConnHelper.GetDataTable("select * from " + TabName + " where " + str1 + " = " + str2 + " ")); }