Esempio n. 1
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

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

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int    RoleID      = int.Parse(this.lblRoleID.Text);
            string Description = this.txtDescription.Text;


            KDMYsoft.Model.Nhiber.Accounts_Roles model = new KDMYsoft.Model.Nhiber.Accounts_Roles();
            model.RoleID      = RoleID;
            model.Description = Description;

            KDMYsoft.BLL.Nhiber.Accounts_Roles bll = new KDMYsoft.BLL.Nhiber.Accounts_Roles();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Esempio n. 2
0
 private void ShowInfo(int RoleID)
 {
     KDMYsoft.BLL.Nhiber.Accounts_Roles   bll   = new KDMYsoft.BLL.Nhiber.Accounts_Roles();
     KDMYsoft.Model.Nhiber.Accounts_Roles model = bll.GetModel(RoleID);
     this.lblRoleID.Text      = model.RoleID.ToString();
     this.txtDescription.Text = model.Description;
 }
Esempio n. 3
0
 private void ShowInfo(int RoleID)
 {
     KDMYsoft.BLL.Nhiber.Accounts_Roles bll=new KDMYsoft.BLL.Nhiber.Accounts_Roles();
     KDMYsoft.Model.Nhiber.Accounts_Roles model=bll.GetModel(RoleID);
     this.lblRoleID.Text=model.RoleID.ToString();
     this.lblDescription.Text=model.Description;
 }
Esempio n. 4
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtDescription.Text.Trim().Length==0)
            {
                strErr+="Description不能为空!\\n";
            }

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

            KDMYsoft.Model.Nhiber.Accounts_Roles model=new KDMYsoft.Model.Nhiber.Accounts_Roles();
            model.Description=Description;

            KDMYsoft.BLL.Nhiber.Accounts_Roles bll=new KDMYsoft.BLL.Nhiber.Accounts_Roles();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this,"保存成功!","add.aspx");
        }
Esempio n. 5
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

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

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

            KDMYsoft.Model.Nhiber.Accounts_Roles model = new KDMYsoft.Model.Nhiber.Accounts_Roles();
            model.Description = Description;

            KDMYsoft.BLL.Nhiber.Accounts_Roles bll = new KDMYsoft.BLL.Nhiber.Accounts_Roles();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Esempio n. 6
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtDescription.Text.Trim().Length==0)
            {
                strErr+="Description不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int RoleID=int.Parse(this.lblRoleID.Text);
            string Description=this.txtDescription.Text;

            KDMYsoft.Model.Nhiber.Accounts_Roles model=new KDMYsoft.Model.Nhiber.Accounts_Roles();
            model.RoleID=RoleID;
            model.Description=Description;

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