/// <summary> /// 获取数据 /// </summary> public void getData(string strWhere) { string currentPage = Context.Request.QueryString["currentPage"]; Teacher tea = (Teacher)Session["loginuser"]; teaAccount = tea.TeaAccount; //teacher = (Teacher)Session["loginuser"]; string countPage = Request.QueryString["currentPage"]; string where1 = "teaAccount = " + teaAccount; string where2 = "teaAccount = " + teaAccount + " and " + strWhere; TableBuilder tableBuilder = new TableBuilder() { StrTable = "V_TitleRecord", StrWhere = strWhere == null || strWhere == "" ? where1 : where2, IntColType = 0, IntOrder = 0, IntPageNum = 1, IntPageSize = pagesize, StrColumn = "titleRecordId", StrColumnlist = "*" }; //getCurrentPage = int.Parse(countPage); ds = titleBll.SelectBypage(tableBuilder, out count); }
/// <summary> /// 获取数据 /// </summary> /// <param name="strWhere">查询条件</param> public void getdata(String strWhere) { string currentPage = Request.QueryString["currentPage"]; if (currentPage == null || currentPage.Length <= 0) { currentPage = "1"; } TitleBll titbll = new TitleBll(); Teacher tea = (Teacher)Session["loginuser"]; string teaAccount = tea.TeaAccount; string account = "teaAccount = '" + teaAccount + "'"; string Account = "teaAccount = '" + teaAccount + "' and "; TableBuilder tabuilder = new TableBuilder(); tabuilder.StrTable = "V_Title"; tabuilder.StrWhere = (strWhere == null || strWhere == "" ? account : Account + strWhere); tabuilder.IntColType = 0; tabuilder.IntOrder = 1; tabuilder.IntPageNum = int.Parse(currentPage); tabuilder.IntPageSize = pagesize; tabuilder.StrColumn = "titleId"; tabuilder.StrColumnlist = "*"; getCurrentPage = int.Parse(currentPage); ds = titbll.SelectBypage(tabuilder, out count); //加载所有分院 colds = colbll.Select(); //加载登录教师所在分院的专业 TableBuilder tabuilderPro = new TableBuilder(); tabuilderPro.StrTable = "T_Profession"; tabuilderPro.StrWhere = "collegeId = '" + tea.college.ColID + "'"; tabuilderPro.IntColType = 0; tabuilderPro.IntOrder = 0; tabuilderPro.IntPageNum = 1; tabuilderPro.IntPageSize = 100; tabuilderPro.StrColumn = "proId"; tabuilderPro.StrColumnlist = "*"; prods = probll.SelectBypage(tabuilderPro, out count); //加载登录教师所在分院的批次 TableBuilder tabuilderPlan = new TableBuilder(); tabuilderPlan.StrTable = "T_Plan"; tabuilderPlan.StrWhere = "collegeId = '" + tea.college.ColID + "'"; tabuilderPlan.IntColType = 0; tabuilderPlan.IntOrder = 0; tabuilderPlan.IntPageNum = 1; tabuilderPlan.IntPageSize = 100; tabuilderPlan.StrColumn = "planId"; tabuilderPlan.StrColumnlist = "*"; plads = plabll.SelectBypage(tabuilderPlan, out count); }
/// <summary> /// 获取数据 /// </summary> /// <param name="strWhere">查询条件</param> public void getdata(String strWhere) { string where = ""; Teacher teacher = new Teacher(); string currentPage = Request.QueryString["currentPage"]; if (currentPage == null || currentPage.Length <= 0) { currentPage = "1"; } if (state == "0") { where = ""; dsColl = colbll.Select(); dsPro = probll.SelectByCollegeId(Convert.ToInt32(Session["collegeId"])); dsPlan = plabll.getPlanByCid(Convert.ToInt32(Session["collegeId"])); } else if (state == "1") { teacher = (Teacher)Session["loginuser"]; where = "collegeId = '" + teacher.college.ColID + "'"; dsPro = probll.SelectByCollegeId(teacher.college.ColID); dsPlan = plabll.getPlanByCid(teacher.college.ColID); } else if (state == "2") { teacher = (Teacher)Session["user"]; where = "collegeId = '" + teacher.college.ColID + "'"; dsPro = probll.SelectByCollegeId(teacher.college.ColID); dsPlan = plabll.getPlanByCid(teacher.college.ColID); } TitleBll titbll = new TitleBll(); TableBuilder tabuilder = new TableBuilder(); tabuilder.StrTable = "V_Title"; tabuilder.StrWhere = (strWhere == null || strWhere == "" ? where : strWhere); tabuilder.IntColType = 0; tabuilder.IntOrder = 1; tabuilder.IntPageNum = int.Parse(currentPage); tabuilder.IntPageSize = pagesize; tabuilder.StrColumn = "titleId"; tabuilder.StrColumnlist = "*"; getCurrentPage = int.Parse(currentPage); ds = titbll.SelectBypage(tabuilder, out count); }
//列表 /// <summary> /// 表格数据加载 /// </summary> /// <param name="strWhere">查询条件</param> public void getPage(String strWhere) { string currentPage = Request.QueryString["currentPage"]; if (currentPage == null || currentPage.Length <= 0) { currentPage = "1"; } TableBuilder tabuilder = new TableBuilder() { StrTable = "V_Title", StrWhere = strWhere == null ? "state = 1" : "state = 1 and " + strWhere, IntColType = 0, IntOrder = 1, IntPageNum = int.Parse(currentPage), IntPageSize = pagesize, StrColumn = "titleId", StrColumnlist = "*" }; getCurrentPage = int.Parse(currentPage); ds = titbll.SelectBypage(tabuilder, out count); }
/// <summary> /// 获取数据 /// </summary> /// <param name="strWhere">查询条件</param> public void getdata(String strWhere) { string currentPage = Request.QueryString["currentPage"]; if (currentPage == null || currentPage.Length <= 0) { currentPage = "1"; } TitleBll titbll = new TitleBll(); string account = "defenGroupId = " + defenGroupId; string Account = account + " and "; string type = Request.QueryString["type"]; //选择文本 if (type == "textSelect") { strWhere = Search(); } //批次下拉菜单 if (type == "plandrop") { dropstrWhereplan = Context.Request.QueryString["dropstrWhereplan"].ToString(); if (dropstrWhereplan == "0") { strWhere = ""; } strWhere = string.Format(" planId = {0}", dropstrWhereplan); } //专业下拉菜单 if (type == "prodrop") { dropstrWherepro = Request["dropstrWherepro"]; strWhere = string.Format(" proId = {0}", dropstrWherepro); } //学院下拉菜单 if (type == "colldrop") { dropstrWherecoll = Request["dropstrWherecoll"]; strWhere = string.Format(" collegeId = {0}", dropstrWherecoll); //加载超管所选分院的所有专业 TableBuilder tabuilderPro = new TableBuilder(); tabuilderPro.StrTable = "T_Profession"; tabuilderPro.StrWhere = "collegeId = '" + dropstrWherecoll + "'"; tabuilderPro.IntColType = 0; tabuilderPro.IntOrder = 0; tabuilderPro.IntPageNum = 1; tabuilderPro.IntPageSize = 100; tabuilderPro.StrColumn = "proId"; tabuilderPro.StrColumnlist = "*"; prods = probll.SelectBypage(tabuilderPro, out count); //加载超管所选分院的所有批次 TableBuilder tabuilderPlan = new TableBuilder(); tabuilderPlan.StrTable = "T_Plan"; tabuilderPlan.StrWhere = "collegeId = '" + dropstrWherecoll + "'"; tabuilderPlan.IntColType = 0; tabuilderPlan.IntOrder = 0; tabuilderPlan.IntPageNum = 1; tabuilderPlan.IntPageSize = 100; tabuilderPlan.StrColumn = "planId"; tabuilderPlan.StrColumnlist = "*"; plads = plabll.SelectBypage(tabuilderPlan, out count); } //所有下拉菜单 if (type == "alldrop") { dropstrWhereplan = Context.Request.QueryString["dropstrWhereplan"].ToString(); dropstrWherepro = Context.Request.QueryString["dropstrWherepro"].ToString(); strWhere = string.Format(" proId = {0} and planId = {1}", dropstrWherepro, dropstrWhereplan); } TableBuilder tabuilder = new TableBuilder(); tabuilder.StrTable = "V_DefenceRecord"; tabuilder.StrWhere = (strWhere == null || strWhere == "" ? account : Account + strWhere); tabuilder.IntColType = 0; tabuilder.IntOrder = 0; tabuilder.IntPageNum = int.Parse(currentPage); tabuilder.IntPageSize = pagesize; tabuilder.StrColumn = "defenRecordId"; tabuilder.StrColumnlist = "*"; getCurrentPage = int.Parse(currentPage); ds = titbll.SelectBypage(tabuilder, out count); //加载所有分院 if (state == 2 || state == 1) { //加载登录教师所在分院的专业 TableBuilder tabuilderPro = new TableBuilder(); tabuilderPro.StrTable = "T_Profession"; tabuilderPro.StrWhere = "collegeId = '" + tea.college.ColID + "'"; tabuilderPro.IntColType = 0; tabuilderPro.IntOrder = 0; tabuilderPro.IntPageNum = 1; tabuilderPro.IntPageSize = 100; tabuilderPro.StrColumn = "proId"; tabuilderPro.StrColumnlist = "*"; prods = probll.SelectBypage(tabuilderPro, out count); //加载登录教师所在分院的批次 TableBuilder tabuilderPlan = new TableBuilder(); tabuilderPlan.StrTable = "T_Plan"; tabuilderPlan.StrWhere = "collegeId = '" + tea.college.ColID + "'"; tabuilderPlan.IntColType = 0; tabuilderPlan.IntOrder = 0; tabuilderPlan.IntPageNum = 1; tabuilderPlan.IntPageSize = 100; tabuilderPlan.StrColumn = "planId"; tabuilderPlan.StrColumnlist = "*"; plads = plabll.SelectBypage(tabuilderPlan, out count); } else if (state == 0) { dropstrWherecoll = Request["dropstrWherecoll"]; dropstrWherepro = Request["dropstrWherepro"]; dropstrWhereplan = Request["dropstrWhereplan"]; //加载超管所选分院的所有专业 TableBuilder tabuilderPro = new TableBuilder(); tabuilderPro.StrTable = "T_Profession"; tabuilderPro.StrWhere = "collegeId = '" + dropstrWherecoll + "'"; tabuilderPro.IntColType = 0; tabuilderPro.IntOrder = 0; tabuilderPro.IntPageNum = 1; tabuilderPro.IntPageSize = 100; tabuilderPro.StrColumn = "proId"; tabuilderPro.StrColumnlist = "*"; prods = probll.SelectBypage(tabuilderPro, out count); //加载超管所选分院的所有批次 TableBuilder tabuilderPlan = new TableBuilder(); tabuilderPlan.StrTable = "T_Plan"; tabuilderPlan.StrWhere = "collegeId = '" + dropstrWherecoll + "'"; tabuilderPlan.IntColType = 0; tabuilderPlan.IntOrder = 0; tabuilderPlan.IntPageNum = 1; tabuilderPlan.IntPageSize = 100; tabuilderPlan.StrColumn = "planId"; tabuilderPlan.StrColumnlist = "*"; plads = plabll.SelectBypage(tabuilderPlan, out count); } }