protected void Button_list_del_Click(object sender, CommandEventArgs e) { ExcFunc ef = new ExcFunc(); ef.DeleteNews(long.Parse(e.CommandName.ToString()), int.Parse(Session["Userid"].ToString())); Response.Redirect("NewsManager.aspx"); }
protected void Button_submit_Click(object sender, EventArgs e) { long result = 0; // LanData tmp = eu.getLandata_by_name(this.TextBox_building.Text); // if (tmp != null && tmp.ID != int.Parse(this.Label_hide_lid.Text)) //{ // this.Label_fix_tip.Text = "该小区已有信息,请勿重复添加"; // return; //} ExcFunc ef = new ExcFunc(); result = ef.EditFirehouse(firehouse, int.Parse(Session["Userid"].ToString())); if (result > 0) { this.Label_fix_tip.Text = "数据成功更新"; this.Response.Redirect("InsertFirehouse.aspx"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }
protected void Button_submit_Click(object sender, EventArgs e) { long result = 0; // LanData tmp = eu.getLandata_by_name(this.TextBox_building.Text); // if (tmp != null && tmp.ID != int.Parse(this.Label_hide_lid.Text)) //{ // this.Label_fix_tip.Text = "该小区已有信息,请勿重复添加"; // return; //} ExcFunc ef = new ExcFunc(); result = ef.EditLandata(landata, int.Parse(Session["Userid"].ToString())); if (result > 0) { //this.Label_fix_tip.Text = "数据成功更新"; Session["Lanid"] = landata.ID; //Response.Redirect("InsertNode.aspx"); Response.Write("<script language='javascript'>alert('数据成功更新.'); location.href='InsertNode.aspx'</script>"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }
protected void Button_submit_Click(object sender, EventArgs e) { long result = 0; ExcFunc ef = new ExcFunc(); result = ef.EditNews(news, int.Parse(Session["Userid"].ToString())); if (result > 0) { this.Label_fix_tip.Text = "数据成功提交"; this.Response.Redirect("NewslistShow.aspx"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }
protected void Button_submit_Click(object sender, EventArgs e) { long result = 0; ExcFunc ef = new ExcFunc(); result = ef.Addfirehouse(firehouse, int.Parse(Session["Userid"].ToString())); if (result > 0) { this.Label_fix_tip.Text = "数据成功提交"; //Session["Lanid"] = result; this.Response.Redirect("InsertFirehouse.aspx"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }
protected void Button_formatpw_Click(object sender, EventArgs e) { //if (Session["Userid"] == null || Session["Memberid"] == null || Session["WebType"] == null) //{ // Response.Write("<script language='javascript'>alert('请重新登录.'); location.href='Default.aspx'</script>"); //} if (this.Label_id.Text != "0") { ExcFunc euf = new ExcFunc(); int result = euf.InitePassword(int.Parse(Session["Userid"].ToString())); //判断于底层返回值0重复,-1失败,other为id成功 if (result > 0) { //if (Session["WebType"].ToString() == "Role") //{ Response.Write("<script language='javascript'>alert('初始化密码123456成功。'); location.href='U_Manager.aspx'</script>"); //} //else //{ // Response.Write("<script language='javascript'>alert('初始化密码成功。'); location.href='用户信息.aspx'</script>"); //} } else { //if (Session["WebType"].ToString() == "Role") //{ Response.Write("<script language='javascript'>alert('初始化密码123456失败。'); location.href='U_Manager.aspx'</script>"); //} //else //{ // Response.Write("<script language='javascript'>alert('初始化密码失败。'); location.href='用户信息.aspx'</script>"); //} } } }
protected void Button_submit_Click(object sender, EventArgs e) { long result = 0; ExcFunc ef = new ExcFunc(); result = ef.AddEquipdata(equipdata, int.Parse(Session["Userid"].ToString())); //if (eu.getLandata_by_name(this.TextBox_building.Text) != null) //{ // this.Label_fix_tip.Text = "该楼层已有信息,请勿重复添加"; // return; //} //result = eu.insert_landata(landata, int.Parse(Session["Userid"].ToString())); if (result > 0) { this.Label_fix_tip.Text = "数据成功提交"; this.Response.Redirect("InsertEquip.aspx"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }
protected void Button_submit_Click(object sender, EventArgs e) { if (this.TextBox_newpw.Text != this.TextBox_checkpw.Text) { this.Label_result.Text = "两次输入密码不一致,请重新输入。"; return; } UseFunc uf = new UseFunc(); Members mbs = uf.GetMembers(int.Parse(Session["Userid"].ToString())); if (md5.Md5Encode(this.TextBox_oldpw.Text) != mbs.Password) { this.Label_result.Text = "原始密码错误,请重新输入。"; return; } ExcFunc euf = new ExcFunc(); int result = euf.Editmembers(member, int.Parse(Session["Userid"].ToString())); if (result != 0) { Response.Write("<script language='javascript'>alert('密码更改成功,请重新登录。'); location.href='LoginOut.aspx'</script>"); } }
protected void Button_submit_Click(object sender, EventArgs e) { int result = 0; UseFunc uf = new UseFunc(); if (!uf.userCheck(member.Account)) { this.Label_fix_tip.Text = "该账号已被占用"; return; } ExcFunc ef = new ExcFunc(); result = ef.Addmembers(member, int.Parse(Session["Userid"].ToString())); if (result > 0) { this.Label_fix_tip.Text = "数据成功提交"; //Session["Lanid"] = result; this.Response.Redirect("U_Manager.aspx"); } else { this.Label_fix_tip.Text = "数据提交失败"; } }