/// <summary> /// 根据ID删除模型中的数据 /// </summary> /// <param name="Info"></param> public void ModelDelete(HXD.ModelField.Model.Model Info) { try { DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select * from " + Info.TableName + " where id in(" + Info.Temp + ")"); for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { for (int c = 0; c < ds.Tables[0].Columns.Count; c++) { if (ds.Tables[0].Rows[i][c].ToString().IndexOf("/") == 0 && ds.Tables[0].Rows[i][c].ToString().Length > 30) { string[] files = ds.Tables[0].Rows[i][c].ToString().Split(','); for (int k = 0; k < files.Length; k++) { if (files[k].IndexOf("/") == 0) { HXD.Common.Utils.DelThumbnail(files[k]); //删除所有缩略图文件 FileOperate.DeleteFile(files[k]); //删除原始文件 } } } if (ds.Tables[0].Rows[i][c].ToString().Length > 30) { FileOperate.GetImgTag(ds.Tables[0].Rows[i][c].ToString());//删除内容中的图片 //FileOperate.DelFiles(ds.Tables[0].Rows[i][c].ToString(), "url", "flv");//删除内容中的Flv } } } SQLHelper.ExecuteNonQuery("ModelDelete", Info.Temp, Info.TableName); } catch { } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(); getztOperation(); if (!IsPostBack) { string MenuId = Session["userid"].ToString(); string sql_mid = "select Classid from tb_User where id=" + MenuId; int scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString()); //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); //cid 1=测评 2=预约 3=辅导 4=消息 HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = " Classid=" + scholl_id + " and cid=4 and zxs_id=" + MenuId + ""; mod.FieldList = "Content,ClassId,PostTime,IsStatus"; mod.TableName = "tb_U_Message"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 Content,ClassId,PostTime,IsStatus from tb_U_Message where Classid=" + scholl_id + " order by Sort desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); //审核 int icd = StringDeal.ToInt(Request.QueryString["Id"]); string Action = Request.QueryString["Action"]; if (Action == "lock") { string sql2 = "SELECT IsStatus from tb_U_Message where id='" + icd + "'"; bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); string sql = "UPDATE tb_U_Message set IsStatus=1 where id='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(); getztOperation(); if (!IsPostBack) { // string sqlc = "select id,FstudentNo,Fscore,posttime from t_exam_results where [Fresultid] in(select distinct Fresultid from t_exam_subitems_score where Fsubitemid='" + Fsubitemid + "' and [Fscore] >='" + Fscore + "' and [wid] ='" + wid + "')"; string Fsubitemid = Request.QueryString["Fsubitemid"].ToString().Trim(); string Fscore = Request.QueryString["Fscore"].ToString().Trim(); string wid = Request.QueryString["wid"].ToString().Trim(); //string MenuId = Session["userid"].ToString(); //string sql_mid = "select Classid from tb_User where id=" + MenuId; int scholl_id = int.Parse(LoginCheck.getadminid()); //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); //select * from t_exam_results where Fpaperid=1 and Fscore>160 and wid= mod.Condition = " Fpaperid='" + Fsubitemid + "' and Fscore >='" + Fscore + "' and wid ='" + wid + "'"; mod.FieldList = "FstudentNo,Fscore,posttime"; mod.TableName = "t_exam_results"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select id,FstudentNo,Fscore,posttime from t_exam_results where Fpaperid='" + Fsubitemid + "' and Fscore >='" + Fscore + "' and wid ='" + wid + "' order by Sort desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(); getztOperation(); if (!IsPostBack) { string MenuId = Session["userid"].ToString(); string sql_mid = "select Classid from tb_User where id=" + MenuId; int scholl_id = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_mid).ToString()); //string sql = "SELECT * from tb_User where Classid='" + scholl_id + "' and GroupId=1 order by id"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = " Classid=" + scholl_id + " and GroupId=1 "; mod.FieldList = "UserName,RegTime,islock"; mod.TableName = "tb_User"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 UserName,RegTime,islock from tb_User where Classid=" + scholl_id + " and GroupId=1 order by Sort desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(5); if (!IsPostBack) { getztOperation(); string userid = Session["userid"].ToString(); //string sql = "select * from tb_U_Message where zxs_id=" + userid; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); //cid 1=消息 2=预约 3=辅导 HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = "cid in(2,3) and zxs_id=" + userid; mod.FieldList = "uid,state,yy_time"; mod.TableName = "tb_U_Message"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 uid,state,yy_time from tb_U_Message where cid in(2,3) and zxs_id=" + userid + " order by Sort desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); } }
protected void Page_Load(object sender, EventArgs e) { if (Request.QueryString["c"] != "" || Request.QueryString["c"] != null) { int id = int.Parse(Request.QueryString["c"].ToString()); //string sql = "select id,Title,PostTime from tb_U_info where ClassId="+id; string sql2 = "select title from tb_U_schoolfl where Id=" + id; list_title = HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString(); //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = " Classid=" + id + " "; mod.FieldList = "Title,PostTime"; mod.TableName = "tb_U_Info"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 id,Title from tb_U_Info where Classid=" + id + " order by Sort desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView1(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); } }
protected void bd() { string classid = LoginCheck.getadminid(); string sqld = "select id from tb_User where Classid=" + classid + " and GroupId=1"; string sql = "select id from tb_U_user where id in(" + sqld + ") "; //string sql2 = "select id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ")"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql2); //Repeater1.DataBind(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = ""; mod.FieldList = "[User_id],Creation_time"; mod.TableName = "tb_VortexDecompression"; mod.Sort = "Creation_time desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 id,Creation_time from tb_VortexDecompression order by Creation_time desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(5); if (!IsPostBack) { //string sql = "select * from tb_U_Cplist where post_uid=" + Session["userid"] + " order by id desc"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); //Repeater1.DataBind(); getztOperation(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = "post_uid=" + Session["userid"]; mod.FieldList = "title,cp_set,PostTime,cp_id,CreateUsers"; mod.TableName = "tb_U_Cplist"; mod.Sort = "Sort desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 title,cp_set,PostTime,cp_id,CreateUsers from tb_U_Cplist where post_uid='" + Session["userid"].ToString() + "' order by id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); } }
/// <summary> /// 绑定量表 /// </summary> /// <param name="id"></param> /* protected void lb(string userid) * { * string setting = LoginCheck.LbManage(int.Parse(Session["userid"].ToString())); * //string sql1 = "select UserSetting from tb_User where id=" + userid; * //string UserSetting = HXD.DBUtility.SQLHelper.ExecuteScalar(sql1).ToString(); * setting = setting.Substring(1); * setting = setting.Substring(0, setting.Length - 1); * setting = setting.Replace("m", "0"); * string sql = "select Fpaperid,Fpapername from t_exam_paper where [User_id] in (" + setting + ")"; * DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); * * }*/ protected void Button1_Click(object sender, EventArgs e) { string sex = "", tj = "", stj = "", str_lb = ""; if (this.option1.Checked == true) { tj += "and sex='男'"; } if (this.option2.Checked == true) { tj += "and sex='女'"; } string str_mz = this.se_mz.Value;//民族 if (str_mz != "0") { tj += "and nationality='" + str_mz + "'"; } string name = this.TextBox1.Text;//名字 if (name != "") { tj += "and Name like '%" + name + "%'"; } string a_time = ks_time.Value;//开始时间 if (a_time != "") { str_lb += "and postTime>='" + a_time + "'"; } string b_time = js_time.Value;//结束时间 if (b_time != "") { str_lb += "and postTime<='" + b_time + "'"; } string classid = LoginCheck.getadminid(); string sqld = "select id from tb_User where Classid=" + classid + " and GroupId=1"; string sql = "select id from tb_U_user where id in(" + sqld + ") " + tj + ""; //string sql2 = "select id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ")"; //Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql2); //Repeater1.DataBind(); HXD.ModelField.BLL.Model bll = new HXD.ModelField.BLL.Model(); HXD.ModelField.Model.Model mod = new HXD.ModelField.Model.Model(); mod.Condition = " Fresultid in(" + sql + ") " + str_lb + ""; mod.FieldList = "Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime"; mod.TableName = "t_exam_results"; mod.Sort = "postTime desc"; mod.PageSize = 20; mod.PageIndex = HXD.Common.StringDeal.ToInt(Request.QueryString["page"]); DataSet ds1 = bll.ModelList(mod); DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset("select top 20 id,Fresultid,FstudentNo,Fpaperid,Fscore,Fresult,postTime from t_exam_results where Fresultid in(" + sql + ") " + str_lb + " order by postTime desc,id desc;"); this.Repeater1.DataSource = ds1; this.Repeater1.DataBind(); HXD.Common.SgqPage pg = new HXD.Common.SgqPage(); pg.PageSize = mod.PageSize; pg.PageIndex = mod.PageIndex; pg.RecordCount = (int)ds1.Tables[1].Rows[0][0]; this.Literal1.Text = pg.PageView2(); if (pg.RecordCount == 0) { this.Literal1.Text = "暂无数据!"; } ds.Clear(); ds.Dispose(); ds1.Clear(); ds1.Dispose(); }
/// <summary> /// 读取模型列表 /// </summary> /// <param name="Info"></param> /// <returns></returns> public DataSet ModelReader(HXD.ModelField.Model.Model Info) { DataSet ds = SQLHelper.ExecuteDataset("ModelReader", Info.Id, Info.TableName); return(ds); }
/// <summary> /// 根据表名以及条件获取需要的字段并返回列表 /// </summary> /// <param name="Info"></param> /// <returns></returns> public DataSet ModelList2(HXD.ModelField.Model.Model Info) { DataSet ds = SQLHelper.ExecuteDataset("ModelList", Info.TableName, Info.FieldList, Info.Condition, Info.F_leibie, Info.PageSize, Info.PageIndex); return(ds); }
/// <summary> /// 根据ID设置模型中的数据热门 /// </summary> /// <param name="Info"></param> public void ModelHot(HXD.ModelField.Model.Model Info) { SQLHelper.ExecuteNonQuery("ModelHot", Info.Temp, Info.TableName, Info.IsHot); }
/// <summary> /// 根据ID设置模型中的数据推荐 /// </summary> /// <param name="Info"></param> public void ModelElite(HXD.ModelField.Model.Model Info) { SQLHelper.ExecuteNonQuery("ModelElite", Info.Temp, Info.TableName, Info.IsElite); }
/// <summary> /// 根据ID设置模型中的数据置顶 /// </summary> /// <param name="Info"></param> public void ModelTop(HXD.ModelField.Model.Model Info) { SQLHelper.ExecuteNonQuery("ModelTop", Info.Temp, Info.TableName, Info.IsTop); }
/// <summary> /// 根据ID设置模型中的数据审核 /// </summary> /// <param name="Info"></param> public void ModelStatus(HXD.ModelField.Model.Model Info) { SQLHelper.ExecuteNonQuery("ModelStatus", Info.Temp, Info.TableName, Info.IsStatus); }