Ejemplo n.º 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtproperty_count.Text))
            {
                strErr+="财产数量格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int property_ID=int.Parse(this.lblproperty_ID.Text);
            int virtualgoods_ID=int.Parse(this.lblvirtualgoods_ID.Text);
            string user_telphone=this.lbluser_telphone.Text;
            int property_count=int.Parse(this.txtproperty_count.Text);

            la.Model.ownvirtualgoods model=new la.Model.ownvirtualgoods();
            model.property_ID=property_ID;
            model.virtualgoods_ID=virtualgoods_ID;
            model.user_telphone=user_telphone;
            model.property_count=property_count;

            la.BLL.ownvirtualgoods bll=new la.BLL.ownvirtualgoods();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","list.aspx");
        }