Ejemplo n.º 1
0
 private void ShowInfo(int ID)
 {
     JiaJiao.BLL.Student bll=new JiaJiao.BLL.Student();
     JiaJiao.Model.Student model=bll.GetModel(ID);
     this.lblID.Text=model.ID.ToString();
     this.lblStuName.Text=model.StuName;
     this.lblStuEmail.Text=model.StuEmail;
     this.lblStuTel.Text=model.StuTel;
     this.lblStuAddress.Text=model.StuAddress;
     this.lblRoleId.Text=model.RoleId.ToString();
     this.lblCreateTime.Text=model.CreateTime.ToString();
     this.lblUpdteTime.Text=model.UpdteTime.ToString();
 }
Ejemplo n.º 2
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";
            if (this.txtStuName.Text.Trim().Length == 0)
            {
                strErr += "姓名不能为空!\\n";
            }

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

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int ID = int.Parse(this.lblID.Text);
            string StuName = this.txtStuName.Text;
            string StuEmail = this.txtStuEmail.Text;
            string StuTel = this.txtStuTel.Text;
            string StuAddress = this.txtStuAddress.Text;
            int RoleId = int.Parse(this.DropDownList1.SelectedValue);
            DateTime CreateTime = model1.CreateTime.Value;
            DateTime UpdteTime = DateTime.Now;

            JiaJiao.Model.Student model = new JiaJiao.Model.Student();
            model.ID = ID;
            model.StuName = StuName;
            model.StuEmail = StuEmail;
            model.StuTel = StuTel;
            model.StuAddress = StuAddress;
            model.RoleId = RoleId;
            model.CreateTime = CreateTime;
            model.UpdteTime = UpdteTime;

            JiaJiao.BLL.Student bll = new JiaJiao.BLL.Student();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Ejemplo n.º 3
0
 private void ShowInfo(int ID)
 {
     JiaJiao.BLL.Student bll = new JiaJiao.BLL.Student();
     model1 = bll.GetModel(ID);
     this.lblID.Text = model1.ID.ToString();
     this.txtStuName.Text = model1.StuName;
     this.txtStuEmail.Text = model1.StuEmail;
     this.txtStuTel.Text = model1.StuTel;
     this.txtStuAddress.Text = model1.StuAddress;
 }