コード例 #1
0
    protected void SaveDataClick(object sender, EventArgs e)
    {
        Hashtable ht = new Hashtable();

        ht["Bname"]   = this.Bname.Text;
        ht["Bjsf"]    = this.Bjsf.Text;
        ht["Bremark"] = this.Bremark.Text;
        ht["Bzeren"]  = this.Bzeren.Text;
        ht["Bzeren1"] = this.Bzeren1.Text;
        ht["Bzeren2"] = this.Bzeren2.Text;

        U_ZCBAOBU zcb1 = new U_ZCBAOBU();

        if (Request["ID"] != null && ViewState["Bname"].ToString() == this.Bname.Text)
        {
            bool first = zcb1.UpdateZcBaoInfo(Request["ID"].ToString(), ht);
            if (first)
            {
                Util.alert(this.Page, "恭喜您,修改资产包成功!");
            }
            else
            {
                Util.alert(this.Page, "很遗憾,修改资产包失败!");
            }
        }
        else
        {
            bool first = zcb1.UpdateZcBaoInfoTrans(Request["ID"].ToString(), ht);
            if (first)
            {
                Util.alert(this.Page, "恭喜您,修改资产包成功!");
                ViewState["Bname"] = this.Bname.Text;
            }
            else
            {
                Util.alert(this.Page, "很遗憾,修改资产包失败!");
            }
        }
    }