Esempio n. 1
0
 private void ShowInfo(int ID)
 {
     zs.BLL.Sys_Group   bll   = new zs.BLL.Sys_Group();
     zs.Model.Sys_Group model = bll.GetModel(ID);
     this.lblID.Text        = model.ID.ToString();
     this.lblType.Text      = model.Type;
     this.lblGroupName.Text = model.GroupName;
     this.lblPID.Text       = model.PID.ToString();
     this.lblIDPath.Text    = model.IDPath;
     this.lblNamePath.Text  = model.NamePath;
 }
Esempio n. 2
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtType.Text.Trim().Length == 0)
            {
                strErr += "Type不能为空!\\n";
            }
            if (this.txtGroupName.Text.Trim().Length == 0)
            {
                strErr += "GroupName不能为空!\\n";
            }
            if (!PageValidate.IsNumber(txtPID.Text))
            {
                strErr += "PID格式错误!\\n";
            }
            if (this.txtIDPath.Text.Trim().Length == 0)
            {
                strErr += "IDPath不能为空!\\n";
            }
            if (this.txtNamePath.Text.Trim().Length == 0)
            {
                strErr += "NamePath不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string Type      = this.txtType.Text;
            string GroupName = this.txtGroupName.Text;
            int    PID       = int.Parse(this.txtPID.Text);
            string IDPath    = this.txtIDPath.Text;
            string NamePath  = this.txtNamePath.Text;

            zs.Model.Sys_Group model = new zs.Model.Sys_Group();
            model.Type      = Type;
            model.GroupName = GroupName;
            model.PID       = PID;
            model.IDPath    = IDPath;
            model.NamePath  = NamePath;

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