/// <summary> /// 删除和移动顺序操作 /// </summary> protected void Operation() { string Action = Request.QueryString["Action"]; mF.Id = StringDeal.ToInt(Request.QueryString["Id"]); if (!String.IsNullOrEmpty(Action)) { if (Action == "down" || Action == "up") { bF.FieldMove(mF, Action); } else if (Action == "del") { mF = bF.GetTableAndField(mF);//字段名与表名 bF.FieldDel(mF); HXD.ModelField.BLL.Field bf = new HXD.ModelField.BLL.Field(); HXD.ModelField.Model.Field mf = new HXD.ModelField.Model.Field(); mf.TableName = mF.TableName; mf.Name = mF.Field; bf.Val = mf; bf.DeleteXml(); } Response.Redirect("Field_Manage.aspx?TableId=" + TableId + "", true); } }
/// <summary> /// 保存频道修改/添加 /// </summary> protected void UserGroupSave() { mUG.Title = this.Title.Text; mUG.ParentId = StringDeal.ToInt(this.ParentId.Text); mUG.Note = this.Note.Text; mUG.Model = StringDeal.ToInt(this.Model.Text); mUG.RegIntegral = StringDeal.ToInt(this.RegIntegral.Text); mUG.LoginIntegral = StringDeal.ToInt(this.LoginIntegral.Text); mUG.Collection = StringDeal.ToInt(this.Collection.Text); mUG.Invite = StringDeal.ToInt(this.Invite.Text); mUG.RegState = StringDeal.ToBool(this.RegState.Text); mUG.GroupSetting = StringDeal.StrFormat(Request.Form["GroupSetting"]); if (mUG.Id > 0) { if (bUG.UserGroupUpdate(mUG) == 1) { StringDeal.Alter("父级用户组不能为其本身!"); } } else { bUG.UserGroupInsert(mUG); } StringDeal.Alter("保存完成!", "UserGroup_Manage.aspx"); }
/// <summary> /// 保存管理员信息 /// </summary> protected void UserSave() { mU.UserName = this.UserName.Text; mU.UserPwd = Encryp.DESEncrypt(this.UserPwd.Text); mField mF = new mField(); bField bF = new bField(); mF.TableName = mm.TableName; DataSet ds = bF.FieldList(mF); string Field = "", Val = ""; for (int i = 0; i < ds.Tables[0].Rows.Count; i++) { Field += ds.Tables[0].Rows[i]["Field"].ToString() + ","; Val += HXD.ModelField.Common.FieldType.FormatField(ds.Tables[0].Rows[i]["Type"].ToString(), ds.Tables[0].Rows[i]["Field"].ToString()) + "{$split$}"; } if (mU.Id == 0) { Field += "Id"; Val += bU.UserInsert(mU).ToString(); bm.ModelInsert(mm.TableName, Field, Val); } else { Field += "1"; Val += "1"; bU.UserUpdate(mU); bm.ModelUpdate(mm.Id, mm.TableName, Field.Trim(','), Val.Trim(',')); } StringDeal.Alter("保存完成!", "User_Manage.aspx?GroupId=" + mU.GroupId + ""); }
protected void getztOperation() { int icd = StringDeal.ToInt(Request.QueryString["Id"]); if (icd > 0) { string Action = Request.QueryString["Action"]; if (Action == "del") { string sql = "delete from tb_U_Message where ID='" + icd + "';"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else if (Action == "lock") { string sql2 = "SELECT IsStatus from tb_U_Message where id='" + icd + "'"; bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); if (stra == true) { string sql = "UPDATE tb_U_Message set IsStatus=0 where id='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else { string sql = "UPDATE tb_U_Message set IsStatus=1 where id='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } } Response.Redirect("message.aspx", true); } }
/// <summary> /// 对栏目的操作(删除,锁定,置顶,排序) /// </summary> protected void Operation() { mM.Id = StringDeal.ToInt(Request.QueryString["Id"]); if (mM.Id > 0) { string Action = Request.QueryString["Action"]; if (Action == "del") { string Result = bM.MenuDel(mM).ToString(); if (Result == "1") { StringDeal.Alter("此栏目下存在子栏目,请先删除子栏目!"); } } else if (Action == "lock") { bM.MenuLock(mM); } else if (Action == "top") { bM.MenuTop(mM); } else if (Action == "down" || Action == "up") { bM.MenuMove(mM, Action); } Response.Redirect("Menu_Manage.aspx?MenuId=" + MenuId + "", true); } }
protected void getztOperation() { string clssid = Request.QueryString["cid"].ToString(); int icd = StringDeal.ToInt(Request.QueryString["Id"]); if (icd > 0) { string Action = Request.QueryString["Action"]; if (Action == "del") { string sql = "delete from tb_U_schoolfl where ID='" + icd + "';"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else if (Action == "lock") { string sql2 = "SELECT IsLock from tb_User where id='" + icd + "'"; bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); if (stra == true) { string sql = "UPDATE tb_User set IsLock=0 where id='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else { string sql = "UPDATE tb_User set IsLock=1 where id='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } } Response.Redirect("sl_fl.aspx?cid=" + clssid, true); } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdminManage(); if (!IsPostBack) { bTable bT = new bTable(); string Action = Request.QueryString["Action"]; if (Action == "del") { mTable mT = new mTable(); mT.Id = StringDeal.ToInt(Request.QueryString["Id"]); if (bT.GetIsSystem(mT)) { StringDeal.Alter("此模型为系统模型禁止删除!"); } mT.TableName = bT.GetTableName(mT.Id); bT.TableDel(mT); HXD.ModelField.BLL.Table bt = new HXD.ModelField.BLL.Table(); bt.DeleteXml(mT); } DBList.DataSource = bT.TableList(); DBList.DataBind(); } }
protected void getztOperation() { int icd = StringDeal.ToInt(Request.QueryString["Id"]); if (icd > 0) { string Action = Request.QueryString["Action"]; if (Action == "del") { //string sql = "delete from tb_User where ID='" + icd + "';delete from tb_U_User where ID='" + icd + "'";delete from tb_U_Message where uid='" + icd + "';delete from t_exam_subitems_score where Fresultid='" + icd + "'; string sql = "delete from tb_User where ID='" + icd + "';delete from tb_U_User where ID='" + icd + "';delete from tb_U_Message where uid='" + icd + "';delete from t_exam_subitems_score where Fresultid='" + icd + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } //else if (Action == "lock") //{ // string sql2 = "SELECT IsLock from tb_User where id='" + icd + "'"; // bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); // if (stra == true) // { // string sql = "UPDATE tb_User set IsLock=0 where id='" + icd + "'"; // HXD.DBUtility.SQLHelper.ExecuteScalar(sql); // } // else // { // string sql = "UPDATE tb_User set IsLock=1 where id='" + icd + "'"; // HXD.DBUtility.SQLHelper.ExecuteScalar(sql); // } //} Response.Redirect("Font_list2.aspx", true); } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdminManage(); AdminSetting.isPermissions("2", "5"); string Action = Request.QueryString["Action"]; int Id = StringDeal.ToInt(Request.QueryString["Id"]); if (Action == "del") { AdminSetting.isPermissions("2", "3"); string Result = bC.ChannelDel(Id).ToString(); if (Result == "1") { StringDeal.Alter("此频道下存在子频道,请先删除子频道!"); } } else if (Action == "lock") { bC.ChannelLock(Id); } else if (Action == "down" || Action == "up") { bC.ChannelMove(Id, Action); } dsList = (DataSet)bC.ChannelList(-1); }
/// <summary> /// 后台频道列表 /// </summary> protected void GetChannelList(int ParentId) { DataView dv = new DataView(dsList.Tables[0]); dv.RowFilter = "ParentId = " + ParentId; foreach (DataRowView dr in dv) { HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">"); HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>"); HttpContext.Current.Response.Write("<td>"); for (int i = 0; i < (int)dr[5]; i++) { HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">"); } HttpContext.Current.Response.Write(bC.GetChannelIsSub((int)dr[0])); HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>"); HttpContext.Current.Response.Write("<td align=\"left\">" + StringDeal.StrFormat(dr[3]) + "</td>"); HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">"); HttpContext.Current.Response.Write("<a href=\"?Action=up&Id=" + dr[0] + "\">上移</a>"); HttpContext.Current.Response.Write(" <a href=\"?Action=down&Id=" + dr[0] + "\">下移</a>"); HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[4], "频道") + "</a>"); HttpContext.Current.Response.Write(" <a href=\"Channel_Edit.aspx?Id=" + dr[0] + "\">修改</a>"); HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>"); HttpContext.Current.Response.Write("</td></tr>"); GetChannelList(StringDeal.ToInt(dr[0])); } }
/// <summary> /// 判断上传文件格式是否正确 /// </summary> /// <param name="UploadType">文件类型</param> /// <param name="FileExt">上传的文件扩展名</param> /// <returns></returns> protected bool FormatUploadType(string FileExt) { if (StringDeal.GetExtNameIsArry("asp,aspx,php,js,jsp".Split(','), FileExt)) { return(false); } else { string VideoType = GetConfig.File("VideoType"); string AudioType = GetConfig.File("AudioType"); string SoftType = GetConfig.File("SoftType"); string OtherType = GetConfig.File("OtherType"); //允许文件类型 if (UploadFileType == "VideoType") { return(StringDeal.GetExtNameIsArry(VideoType.Split(','), FileExt)); } else if (UploadFileType == "AudioType") { return(StringDeal.GetExtNameIsArry(AudioType.Split(','), FileExt)); } else if (UploadFileType == "SoftType") { return(StringDeal.GetExtNameIsArry(SoftType.Split(','), FileExt)); } else if (UploadFileType == "OtherType") { return(StringDeal.GetExtNameIsArry(OtherType.Split(','), FileExt)); } else { return(true); } } }
/// <summUry> /// 批量审核 /// </summUry> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { String[] readerId = Request.Form.GetValues("Select1"); Session["readerIds"] = readerId; strm = this.Select1.Value; if (strm == "0") { StringDeal.Alter("请选择要测评的量表!"); } else { //string sqlset = "select usersetting from tb_user where id=" + Session["userid"].ToString(); //string setting = HXD.DBUtility.SQLHelper.ExecuteScalar(sqlset).ToString(); //int i = 0, ii = 0; ////string str = "1,2,3,4,39,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,90,91,93,94,0,5,6,7,8,9,11,13,18,19,20,21,22,23,24,25,27,28,29,31,40,41,42,44,53,54,55,58,59,62,63,64,65,67,68,69,88,89,92,95,96"; //string lbid = Request.QueryString["lbid"].ToString(); //if (lbid == "2") //{ // i = setting.IndexOf(",0,"); // setting = setting.Substring(0, i);//,0 后的字符串 // strm = setting + ",0," + strm; //} //if (lbid == "1") //{ // ii = setting.IndexOf(",0,"); // setting = setting.Substring(i);//0, 前面的字符串 // strm = strm + setting; //} //string stra = str.Substring(i);//0, 后面的字符串 //string strb = setting.Substring(0,ii);//,0 前的字符串 //string sql = "update tb_user set usersetting='" + strm + "' where ID=" + Session["userid"].ToString(); //HXD.DBUtility.SQLHelper.ExecuteScalar(sql); //string[] sArray = strm.Split(','); //foreach (string i in sArray) //{ // string sql2 = "SELECT IsLock from tb_User where id='" + i + "'"; // bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); // if (stra == true) // { // string sql = "UPDATE tb_User set IsLock=0 where id='" + i + "'"; // HXD.DBUtility.SQLHelper.ExecuteScalar(sql); // } // else // { // string sql = "UPDATE tb_User set IsLock=1 where id='" + i + "'"; // HXD.DBUtility.SQLHelper.ExecuteScalar(sql); // } //} Response.Redirect("add_cp2.aspx?lbid=" + strm, true); } }
protected void getztOperation() { if (Request.QueryString["cid"] != null) { string clssid = Request.QueryString["cid"].ToString(); int icd = StringDeal.ToInt(Request.QueryString["Id"]); if (icd > 0) { string Action = Request.QueryString["Action"]; if (Action == "del") { string sqll = "select COUNT(id) from tb_U_schoolfl where ClassId=" + icd; int ma = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sqll).ToString()); if (ma == 0) { string sql = "delete from tb_U_schoolfl where ID='" + icd + "';"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else { StringDeal.Alter("请先删除下级!"); } } Response.Redirect("sc_fl.aspx?cid=" + clssid, true); } } }
protected void Button2_Click(object sender, EventArgs e) { string MenuId = Request.QueryString["MenuId"].ToString(); string username = this.username.Text.Trim(); string userpwd = Encryp.DESEncrypt(this.userpwd.Text.Trim()); string tell = this.Texttell.Text.Trim(); string xname = this.Textname.Text.Trim(); string sqls = "select * from tb_User where UserName='******'"; DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sqls); if (ds.Tables[0].Rows.Count == 0) { string sql = "insert into tb_User(UserName,UserPwd,GroupId,classid,islock)values('" + username + "','" + userpwd + "',6,'" + MenuId + "',1)"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); //Session["AdminManage"] = username; System.Threading.Thread.Sleep(1000); string sql2 = "select id from tb_User where UserName='******' and datediff(mi,RegTime,getdate())<=1"; string icd = HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString(); //Session["userid"] = icd; string sql3 = "insert into tb_U_User (Id,Tel,name)values('" + icd + "','" + tell + "','" + xname + "')"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql3); StringDeal.Alter("添加成功!"); } else { Response.Write("用户名已存在"); } }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdManage(); getztOperation(); if (!IsPostBack) { string MenuId = Session["userid"].ToString(); string sql_group = "select GroupId from tb_User where id=" + MenuId; int groupid = int.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql_group).ToString()); if (groupid == 7) { //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_U_school order by id"; Repeater1.DataSource = HXD.DBUtility.SQLHelper.ExecuteDataset(sql); Repeater1.DataBind(); } else { StringDeal.Alter("您没有这个权限!"); } } }
/// <summary> /// 频道绑定 /// </summary> /// <param name="Id"></param> /// <param name="Separator"></param> protected void ChannelBind(int Id, string Separator) { DataView dv = new DataView(c_dsList.Tables[0]); dv.RowFilter = "ParentId = " + Id; int item = 1; foreach (DataRowView dr in dv) { Response.Write(Separator); Response.Write("<img src=\"../skin/01/ico/tree_minusmiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\" />"); Response.Write("<input type=\"checkbox\" name=\"GroupSetting\" onclick=\"GroupChecked('" + "SetId_" + Id + "_" + item + "'," + dr[0] + ")\" id=\"SetId_" + Id + "_" + item + "\" value=\"" + dr[0].ToString() + "\""); if (!String.IsNullOrEmpty(GroupSetting)) { string[] Ary = GroupSetting.Split(','); foreach (string k in Ary) { if (k.ToString() == dr[0].ToString()) { Response.Write(" checked"); } } } Response.Write(" />" + dr[2]); Response.Write(" <span id=\"checkid_" + dr[0] + "\">" + GetOther(dr[0], dr[6]) + "</span>\r\n"); Response.Write("<br />"); ChannelBind(StringDeal.ToInt(dr[0]), "<img src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\" />" + Separator); item++; } }
/// <summary> /// 后台频道列表 /// </summary> protected void GetUserGroupList(int ParentId) { DataView dv = new DataView(dsList.Tables[0]); dv.RowFilter = "ParentId = " + ParentId; foreach (DataRowView dr in dv) { HttpContext.Current.Response.Write("<tr onMouseOver=\"over()\" onClick=\"change()\" onMouseOut=\"out()\" class=\"td_bg\">"); HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">" + dr[0] + "</td>"); HttpContext.Current.Response.Write("<td>"); for (int i = 0; i < (int)dr[11]; i++) { HttpContext.Current.Response.Write("<img alt=\"\" src=\"../skin/01/ico/tree_treemiddle.gif\" width=\"18\" height=\"18\" align=\"absmiddle\">"); } HttpContext.Current.Response.Write(bUG.GetUserGroupIsSub((int)dr[0])); HttpContext.Current.Response.Write(StringDeal.StrFormat(dr[2]) + "</td>"); HttpContext.Current.Response.Write("<td align=\"center\">" + bUG.GetModelTitle(dr[4]) + "</td>"); HttpContext.Current.Response.Write("<td align=\"center\">" + GetUserCount(dr[0]) + "</td>"); HttpContext.Current.Response.Write("<td align=\"center\" nowrap=\"nowrap\">"); HttpContext.Current.Response.Write(" <a href=\"User_Manage.aspx?GroupId=" + dr[0] + "\">用户列表</a>"); HttpContext.Current.Response.Write(" <a href=\"?Action=lock&Id=" + dr[0] + "\">" + StringDeal.GetLock(dr[10], "组") + "</a>"); HttpContext.Current.Response.Write(" <a href=\"UserGroup_Edit.aspx?Id=" + dr[0] + "\">修改</a>"); HttpContext.Current.Response.Write(" <a onClick=\"return confirm('确认删除')\" href=\"?Action=del&Id=" + dr[0] + "\">删除</a>"); HttpContext.Current.Response.Write("</td></tr>"); GetUserGroupList(StringDeal.ToInt(dr[0])); } }
/// <summUry> /// 批量删除 /// </summUry> /// <param name="sender"></param> /// <param name="e"></param> protected void Button1_Click(object sender, EventArgs e) { strm = Request["Id"]; if (String.IsNullOrEmpty(strm)) { StringDeal.Alter("请选择要审核的对象!"); } else { string[] sArray = strm.Split(','); foreach (string i in sArray) { string sql2 = "SELECT IsLock from tb_User where id='" + i + "'"; bool stra = bool.Parse(HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString()); if (stra == true) { string sql = "UPDATE tb_User set IsLock=0 where id='" + i + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } else { string sql = "UPDATE tb_User set IsLock=1 where id='" + i + "'"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); } } Response.Redirect("Font_list2.aspx", true); } }
/// <summary> /// 保存频道修改/添加 /// </summary> protected void ChannelSave(object sender, EventArgs e) { mC.Title = this.Title.Text; mC.Url = this.Url.Text; mC.Target = this.Target.Text; mC.Note = this.Note.Text; mC.ParentId = StringDeal.ToInt(this.ParentId.Text); for (int s = 0; s < this.Setting.Items.Count; s++) { if (this.Setting.Items[s].Selected) { mC.Setting += this.Setting.Items[s].Value + ","; } } if (!String.IsNullOrEmpty(mC.Setting)) { mC.Setting = mC.Setting.Trim(','); } else { mC.Setting = ""; } if (mC.Id > 0) { if (bC.ChannelUpdate(mC) == 1) { StringDeal.Alter("父级菜单不能是其本身!"); } } else { bC.ChannelInsert(mC); } StringDeal.Alter("保存完成!", "Channel_Manage.aspx"); }
protected void Page_Load(object sender, EventArgs e) { LoginCheck.AdminManage(); Pages = StringDeal.ToInt(Request.QueryString["Page"]); string Action = Request.QueryString["Action"]; mA.Temp = Request.Params["Id"]; if (Action == "del") { bA.AdminDel(mA); Response.Redirect("Admin_Manage.aspx?Page=" + Pages); } else if (Action == "lock") { mA.Id = StringDeal.ToInt(Request.QueryString["Id"]); if (bA.GetAdminLock(mA)) { mA.IsLock = false; } else { mA.IsLock = true; } bA.AdminLock(mA); Response.Redirect("Admin_Manage.aspx?Page=" + Pages); } if (!IsPostBack) { AdminBind(); } }
protected void Button1_Click(object sender, EventArgs e) { //string MenuId= Request.QueryString["MenuId"].ToString(); string MenuId = LoginCheck.getadminid(); string username = this.txtAdminName.Value.Trim(); string userpwd = Encryp.DESEncrypt(this.TextBox2.Text.Trim()); string email = this.TextBox4.Text.Trim(); string tell = this.TextBox5.Text.Trim(); string dw_name = this.TextBox6.Text.Trim(); string sqls = "select * from tb_User where UserName='******'"; DataSet ds = HXD.DBUtility.SQLHelper.ExecuteDataset(sqls); if (ds.Tables[0].Rows.Count == 0) { string sql = "insert into tb_User(UserName,UserPwd,GroupId,classid,islock)values('" + username + "','" + userpwd + "',6,'" + MenuId + "',0)"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); System.Threading.Thread.Sleep(1000); string sql2 = "select id from tb_User where UserName='******' "; string icd = HXD.DBUtility.SQLHelper.ExecuteScalar(sql2).ToString(); string sql3 = "insert into tb_U_User (Id,Tel,msn,name,sc_id)values('" + icd + "','" + tell + "','" + email + "','" + dw_name + "','" + MenuId + "')"; HXD.DBUtility.SQLHelper.ExecuteScalar(sql3); Response.Redirect("user/"); } else { StringDeal.Alter("用户名已存在"); } }
/// <summary> /// 批量删除 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void DelBut_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(mA.Temp)) { StringDeal.Alter("请选择要删除的对象!"); } bA.AdminDel(mA); Response.Redirect("Admin_Manage.aspx?Page=" + Pages); }
protected void Button1_Click(object sender, EventArgs e) { string psw = Encryp.DESEncrypt("123456"); int id = int.Parse(Request.QueryString["id"].ToString()); string sql = "update tb_user set UserPwd='" + psw + "' where Id=" + id; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); StringDeal.Alter("密码初始化成功 - 默认密码:123456"); }
/// <summary> /// 添加用户 /// </summary> /// <param name="Info"></param> public int UserInsert(mUser Info) { SqlParameter[] par = new SqlParameter[] { new SqlParameter("@GroupId", Info.GroupId), new SqlParameter("@UserName", Info.UserName), new SqlParameter("@UserPwd", Info.UserPwd) }; return(StringDeal.ToInt(SQLHelper.ExecuteScalar("UserInsert", par))); }
protected void Page_Load(object sender, EventArgs e) { string Model = Request.QueryString["Model"]; int Id = StringDeal.ToInt(Request.QueryString["Id"]); int Sort = StringDeal.ToInt(Request.QueryString["Sort"]); HXD.ModelField.BLL.Model mm = new HXD.ModelField.BLL.Model(); mm.ModelSort(Id, Model, Sort); }
/// <summUry> /// 批量删除 /// </summUry> /// <param name="sender"></param> /// <param name="e"></param> protected void DelBut_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(mU.Temp)) { StringDeal.Alter("请选择要删除的对象!"); } bU.UserDel(mU); Response.Redirect("User_Manage.aspx?GroupId=" + mU.GroupId + "&Page=" + Pages); }
protected void Button1_Click(object sender, EventArgs e) { string cid = Request.QueryString["cid"].ToString(); string sql = "update tb_U_Message set Replay='" + container.Value + "',state=1 where id=" + cid; HXD.DBUtility.SQLHelper.ExecuteScalar(sql); StringDeal.Alter("回复成功", "fd_gt.aspx"); }
/// <summary> /// 批量取消热门 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void unHotBut_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(mm.Temp)) { StringDeal.Alter("请选择要取消热门的对象!"); } mm.IsHot = false; bm.ModelHot(mm); Response.Redirect("Model_Manage.aspx?MenuId=" + MenuId, true); }
protected void Button2_Click(object sender, EventArgs e) { string userid = Session["userid"].ToString(); string xx_name = this.TextBox1.Text; string xx_note = Encryp.DESEncrypt(this.TextBox2.Text.Trim()); string sql_u = "update tb_user set userpwd ='" + xx_note + "' where id=" + userid; HXD.DBUtility.SQLHelper.ExecuteScalar(sql_u); StringDeal.Alter("密码更新成功!"); }
/// <summary> /// 批量推荐 /// </summary> /// <param name="sender"></param> /// <param name="e"></param> protected void EliteBut_Click(object sender, EventArgs e) { if (String.IsNullOrEmpty(mm.Temp)) { StringDeal.Alter("请选择要推荐的对象!"); } mm.IsElite = true; bm.ModelElite(mm); Response.Redirect("Model_Manage.aspx?MenuId=" + MenuId, true); }