Exemplo n.º 1
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtroleName.Text.Trim().Length == 0)
            {
                strErr += "roleName不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string roleName = this.txtroleName.Text;

            hm.Model.role model = new hm.Model.role();
            model.roleName = roleName;

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