private void ShowInfo(int RoleId)
 {
     NoName.NetShop.BLL.RoleModelBll bll=new NoName.NetShop.BLL.RoleModelBll();
     NoName.NetShop.Model.RoleModel model=bll.GetModel(RoleId);
     this.lblRoleId.Text=model.RoleId.ToString();
     this.txtRoleName.Text=model.RoleName;
 }
Example #2
0
 private void ShowInfo(int RoleId)
 {
     NoName.NetShop.BLL.RoleModelBll bll   = new NoName.NetShop.BLL.RoleModelBll();
     NoName.NetShop.Model.RoleModel  model = bll.GetModel(RoleId);
     this.lblRoleId.Text   = model.RoleId.ToString();
     this.txtRoleName.Text = model.RoleName;
 }
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtRoleName.Text =="")
            {
            strErr+="RoleName����Ϊ�գ�\\n";
            }

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

            NoName.NetShop.Model.RoleModel model=new NoName.NetShop.Model.RoleModel();
            model.RoleName=RoleName;

            NoName.NetShop.BLL.RoleModelBll bll=new NoName.NetShop.BLL.RoleModelBll();
            bll.Add(model);
        }
Example #4
0
        protected void btnAdd_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtRoleName.Text == "")
            {
                strErr += "RoleName不能为空!\\n";
            }

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

            NoName.NetShop.Model.RoleModel model = new NoName.NetShop.Model.RoleModel();
            model.RoleName = RoleName;

            NoName.NetShop.BLL.RoleModelBll bll = new NoName.NetShop.BLL.RoleModelBll();
            bll.Add(model);
        }