ASP.NET党员交费管理系统(8)

来源:xiaoniu168.com 作者:管理员 添加时间:2011-10-12 点击数:27348

计算机毕业设计党员信息管理功能介绍:

党员信息管理
此模块主要是对党员信息的维护,可以添加、修改、删除党员信息。如图:

计算机毕业论文

以下是引用片段:

核心代码如下:
           protected void Page_Load(object sender, EventArgs e)
    {
        if (!Page.IsPostBack)
        {


            if (Request.QueryString["ID"] != null)
            {
                //显示当前的商品信息
                DataTable tmpda = new DataTable();
                tmpda = Database.GetData("select * from 党员信息 where 学号='" + Request.QueryString["ID"] + "'");
                if (tmpda.Rows.Count > 0)
                {
                    txtXH.ReadOnly = true;
                    this.txtXH.Text = tmpda.Rows[0]["学号"].ToString();
                    this.Txtxm.Text = tmpda.Rows[0]["姓名"].ToString();
                    this.txtSFZ.Text = tmpda.Rows[0]["身份证号"].ToString();
                    this.DropDownList1.SelectedItem.Text = tmpda.Rows[0]["性别"].ToString();
                    this.TxtCDRQ.Text = tmpda.Rows[0]["出生日期"].ToString();
                    this.txtMZ.Text = tmpda.Rows[0]["民族"].ToString();
                    this.TxtJG.Text = tmpda.Rows[0]["籍贯"].ToString();
                    this.TxtRDRQ.Text = tmpda.Rows[0]["入党日期"].ToString();
                    this.TxtLXFS.Text = tmpda.Rows[0]["联系方式"].ToString();
                    this.txtBZ.Text = tmpda.Rows[0]["备注"].ToString();
                   
                }
            }
        }
    }
    protected void Button2_Click(object sender, EventArgs e)
    {
        Response.Redirect("DYList.aspx");
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        if (Request.QueryString["ID"] != null)
        {
            Database.Execute("UPDATE [党员信息] set [学号] = '" + txtXH.Text + "',[姓名] = '" + Txtxm.Text + "',[身份证号] = '" + txtSFZ.Text + "',[性别] = '" + DropDownList1.SelectedValue + "',[出生日期] = '" + TxtCDRQ.Text + "',[民族] = '" + txtMZ.Text + "',[籍贯] ='" + TxtJG.Text + "',[入党日期] = '" + TxtRDRQ.Text + "',[联系方式] ='" + TxtLXFS.Text + "',[备注] ='" + txtBZ.Text + "' WHERE 学号='" + Request.QueryString["ID"] + "'");
        }
        else
        {
            Database.Execute("INSERT INTO [党员信息] ( [学号] ,[姓名] ,[身份证号] ,[性别] ,[出生日期] ,[民族] ,[籍贯] ,[入党日期] ,[联系方式] ,[备注] ,[密码] ) VALUES ('" + txtXH.Text + "','" + Txtxm.Text + "','" + txtSFZ.Text + "','" + DropDownList1.SelectedValue + "','" + TxtCDRQ.Text + "','" + txtMZ.Text + "','" + TxtJG.Text + "','" + TxtRDRQ.Text + "','" + TxtLXFS.Text + "','" + txtBZ.Text + "','000000')");

        }
        Page.ClientScript.RegisterStartupScript(this.GetType(), "info", "");
    }

〖资料来源:计算机毕业论文 www.xiaoniu168.com

第9页为计算机毕业论文党员交费模块介绍......

【联系方式】

【本站信誉】

用心做计算机毕业设计论文网