Exemplo n.º 1
0
        public 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;
            }
            int    roleId   = int.Parse(this.lblroleId.Text);
            string roleName = this.txtroleName.Text;


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

            hm.BLL.role bll = new hm.BLL.role();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Exemplo n.º 2
0
 private void ShowInfo(int roleId)
 {
     hm.BLL.role   bll   = new hm.BLL.role();
     hm.Model.role model = bll.GetModel(roleId);
     this.lblroleId.Text   = model.roleId.ToString();
     this.txtroleName.Text = model.roleName;
 }