protected void btnAdd_Click(object sender, EventArgs e) { string strErr = ""; if (!PageValidate.IsNumber(txtSortValue.Text)) { strErr += "SortValue不是数字!\\n"; } if (strErr != "") { MessageBox.Show(this, strErr); return; } int SortValue = int.Parse(this.txtSortValue.Text); NoName.NetShop.Model.SalesInfoModel model = new NoName.NetShop.Model.SalesInfoModel(); model.SortValue = SortValue; NoName.NetShop.BLL.SalesInfoModelBll bll = new NoName.NetShop.BLL.SalesInfoModelBll(); bll.Add(model); }