private void initalPWD() { List <string> str = new List <string>(); str = AddSQLStringToDAL.GetDistinctString("TabTeachers", "UserID"); for (int i = 0; i < str.Count; i++) { if (AddSQLStringToDAL.UpdataTabTeachers("TabTeachers", PWDProcess.MD5Encrypt(str[i].ToString(), PWDProcess.CreatKey(str[i].ToString())), str[i].ToString())) { ; } { } } List <string> str2 = new List <string>(); str2 = AddSQLStringToDAL.GetDistinctString("TabOtherTeachers", "UserID"); for (int i = 0; i < str2.Count; i++) { if (AddSQLStringToDAL.UpdataTabTeachers("TabOtherTeachers", PWDProcess.MD5Encrypt(str2[i].ToString(), PWDProcess.CreatKey(str2[i].ToString())), str2[i].ToString())) { } } }
protected void Bind() { List <string> str = new List <string>(); str = AddSQLStringToDAL.GetDistinctString("TabTeachers", "Department"); for (int i = 0; i < str.Count; i++) { } }
protected void Bind() { List <string> str = new List <string>(); str = AddSQLStringToDAL.GetDistinctString("TabTeachers", "Department"); for (int i = 0; i < str.Count; i++) { DropDownList2.Items.Add(str[i].ToString()); } }
//TODO private void InsertTeacherCourseSimpleMap(List <string> strList) { for (int i = 0; i < strList.Count; i++) { List <string> strDD = new List <string>(); //根据教师的ID查询出授课时间表,装到一个list中 strDD = AddSQLStringToDAL.GetDistinctString("TabCourses", "TimeAndArea", "TeacherID", strList[i].ToString()); for (int k = 0; k < strDD.Count; k++) { List <string> strResult = new List <string>(); //strResult = SplitString.GetSplitCountAndDetails(strDD[k]); //DataTable dt = AddSQLStringToDAL.GetDTBySQL("TabAllCourses", "TeacherID", strList[i].ToString(), "TimeAndArea", strDD[k].ToString()); } } }
private void InsertTeacherStatus() { Clear(); List <string> strList = new List <string>(); //查询课程信息 strList = AddSQLStringToDAL.GetDistinctString("TabCourses", "TeacherID"); for (int i = 0; i < strList.Count; i++) { //TODO if (true) { lbMessage3.Text = "正在进行第一步预处理"; } } lbMessage3.Text = "第一步:教师信息对比完成,正在进行第二步..."; InsertTeacherCourseSimpleMap(strList); lbMessage3.Text = "所有信息核对无误!等待对数据进行处理!"; }
protected void Button1_Click1(object sender, EventArgs e) { if (TextBox1.Text.Equals("")) { return; } List <string> strSum = new List <string>(); List <string> strID1 = new List <string>(); List <string> strID2 = new List <string>(); List <string> strID3 = new List <string>(); List <string> strID4 = new List <string>(); if (CheckBox1.Checked == true) { strID1 = AddSQLStringToDAL.GetDistinctString("TabTeachers", "UserID", "Role", "2"); } if (CheckBox2.Checked == true) { strID2 = AddSQLStringToDAL.GetDistinctString("TabTeachers", "UserID", "Role", "3"); } if (CheckBox3.Checked == true) { strID3 = AddSQLStringToDAL.GetDistinctString("TabTeachers", "UserID", "Role", "4"); } strSum.AddRange(strID1); strSum.AddRange(strID2); strSum.AddRange(strID3); for (int i = 0; i < strSum.Count; i++) { for (int j = 0; j < strSum.Count; j++) { if (i != j) { if (strSum[i] == strSum[j]) { strSum.RemoveAt(j); } } } } if (strSum.Count > 0) { for (int i = 0; i < strSum.Count; i++) { if (AddSQLStringToDAL.InsertData("insert into TabMessage([Message],[UserID],[MessageStatus]) values('" + TextBox1.Text + "','" + strSum[i] + "','未读')")) { Label6.Text = "信息发送成功!"; } else { Label6.Text = "信息发送失败!"; } } TextBox1.Text = ""; } else { Label6.Text = "没有选择发送单位"; } }