Esempio n. 1
0
 private void ShowInfo(int ID)
 {
     Maticsoft.BLL.userinfo   bll   = new Maticsoft.BLL.userinfo();
     Maticsoft.Model.userinfo model = bll.GetModel(ID);
     this.lblID.Text         = model.ID.ToString();
     this.txtuname.Text      = model.uname;
     this.txtusex.Text       = model.usex;
     this.txtuage.Text       = model.uage;
     this.txtuphone.Text     = model.uphone;
     this.txtuemail.Text     = model.uemail;
     this.txtwid.Text        = model.wid;
     this.txtwname.Text      = model.wname;
     this.txtparameter1.Text = model.parameter1;
     this.txtparameter2.Text = model.parameter2;
 }
Esempio n. 2
0
 private void ShowInfo(int ID)
 {
     Maticsoft.BLL.userinfo bll=new Maticsoft.BLL.userinfo();
     Maticsoft.Model.userinfo model=bll.GetModel(ID);
     this.lblID.Text=model.ID.ToString();
     this.lbluname.Text=model.uname;
     this.lblusex.Text=model.usex;
     this.lbluage.Text=model.uage;
     this.lbluphone.Text=model.uphone;
     this.lbluemail.Text=model.uemail;
     this.lblwid.Text=model.wid;
     this.lblwname.Text=model.wname;
     this.lblparameter1.Text=model.parameter1;
     this.lblparameter2.Text=model.parameter2;
 }
Esempio n. 3
0
        protected void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (this.txtuname.Text.Trim().Length == 0)
            {
                strErr += "uname不能为空!\\n";
            }
            if (this.txtusex.Text.Trim().Length == 0)
            {
                strErr += "usex不能为空!\\n";
            }
            if (this.txtuage.Text.Trim().Length == 0)
            {
                strErr += "uage不能为空!\\n";
            }
            if (this.txtuphone.Text.Trim().Length == 0)
            {
                strErr += "uphone不能为空!\\n";
            }
            if (this.txtuemail.Text.Trim().Length == 0)
            {
                strErr += "uemail不能为空!\\n";
            }
            if (this.txtwid.Text.Trim().Length == 0)
            {
                strErr += "wid不能为空!\\n";
            }
            if (this.txtwname.Text.Trim().Length == 0)
            {
                strErr += "wname不能为空!\\n";
            }
            if (this.txtparameter1.Text.Trim().Length == 0)
            {
                strErr += "parameter1不能为空!\\n";
            }
            if (this.txtparameter2.Text.Trim().Length == 0)
            {
                strErr += "parameter2不能为空!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            string uname      = this.txtuname.Text;
            string usex       = this.txtusex.Text;
            string uage       = this.txtuage.Text;
            string uphone     = this.txtuphone.Text;
            string uemail     = this.txtuemail.Text;
            string wid        = this.txtwid.Text;
            string wname      = this.txtwname.Text;
            string parameter1 = this.txtparameter1.Text;
            string parameter2 = this.txtparameter2.Text;

            Maticsoft.Model.userinfo model = new Maticsoft.Model.userinfo();
            model.uname      = uname;
            model.usex       = usex;
            model.uage       = uage;
            model.uphone     = uphone;
            model.uemail     = uemail;
            model.wid        = wid;
            model.wname      = wname;
            model.parameter1 = parameter1;
            model.parameter2 = parameter2;

            Maticsoft.BLL.userinfo bll = new Maticsoft.BLL.userinfo();
            bll.Add(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "add.aspx");
        }
Esempio n. 4
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(this.txtuname.Text.Trim().Length==0)
            {
                strErr+="uname不能为空!\\n";
            }
            if(this.txtusex.Text.Trim().Length==0)
            {
                strErr+="usex不能为空!\\n";
            }
            if(this.txtuage.Text.Trim().Length==0)
            {
                strErr+="uage不能为空!\\n";
            }
            if(this.txtuphone.Text.Trim().Length==0)
            {
                strErr+="uphone不能为空!\\n";
            }
            if(this.txtuemail.Text.Trim().Length==0)
            {
                strErr+="uemail不能为空!\\n";
            }
            if(this.txtwid.Text.Trim().Length==0)
            {
                strErr+="wid不能为空!\\n";
            }
            if(this.txtwname.Text.Trim().Length==0)
            {
                strErr+="wname不能为空!\\n";
            }
            if(this.txtparameter1.Text.Trim().Length==0)
            {
                strErr+="parameter1不能为空!\\n";
            }
            if(this.txtparameter2.Text.Trim().Length==0)
            {
                strErr+="parameter2不能为空!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int ID=int.Parse(this.lblID.Text);
            string uname=this.txtuname.Text;
            string usex=this.txtusex.Text;
            string uage=this.txtuage.Text;
            string uphone=this.txtuphone.Text;
            string uemail=this.txtuemail.Text;
            string wid=this.txtwid.Text;
            string wname=this.txtwname.Text;
            string parameter1=this.txtparameter1.Text;
            string parameter2=this.txtparameter2.Text;

            Maticsoft.Model.userinfo model=new Maticsoft.Model.userinfo();
            model.ID=ID;
            model.uname=uname;
            model.usex=usex;
            model.uage=uage;
            model.uphone=uphone;
            model.uemail=uemail;
            model.wid=wid;
            model.wname=wname;
            model.parameter1=parameter1;
            model.parameter2=parameter2;

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