📄 send.aspx.cs
字号:
using System;
using System.Data;
using System.Data.SqlClient;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
namespace novel
{
public partial class send : System.Web.UI.Page
{
DB_Class pdb = new DB_Class();
static string strid = null;
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
strid = Session["userid"].ToString();
SqlDataReader dr = pdb.Reader("select amount from send where serial=" + strid + "");
if (dr.Read())
{
amount.Text = dr["amount"].ToString();
}
dr.Close();
}
}
protected void Button1_Click(object sender, EventArgs e)
{
string sqlstr = "update send set pmode='" + pmode.SelectedItem + "',p_key='" + Text_password.Text + "',amount='" + amount.Text + "' ,v_amount='" + v_amount.Text + "',moneytype='" + moneytype.SelectedItem + "',remark='" + remark.Text + "' where serial ="+strid;
// String insert = "insert into send(serial,pmode,p_key,amount,v_amount,moneytype,remark) values('" + serial.Text + "','" + pmode.SelectedItem + "','" + Text_password.Text + "','" + amount.Text + "','" + v_amount.Text + "','" + moneytype.SelectedItem + "','" + remark.Text + "')";
if (pdb.ExecSql(sqlstr))
{
Response.Redirect("Recieve.aspx?oid="+strid);
}
else
{
Page.ClientScript.RegisterStartupScript(this.GetType(), "MessageBox", "alert('失败,请检查!')", true);
}
}
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -