Ejemplo n.º 1
0
 private void ShowInfo(int Id)
 {
     Maticsoft.BLL.UserRelate bll=new Maticsoft.BLL.UserRelate();
     Maticsoft.Model.UserRelate model=bll.GetModel(Id);
     this.lblId.Text=model.Id.ToString();
     this.lblUserId.Text=model.UserId.ToString();
     this.lblRelateUserId.Text=model.RelateUserId.ToString();
     this.lblIsDelete.Text=model.IsDelete?"是":"否";
     this.lblCreateTime.Text=model.CreateTime.ToString();
 }
Ejemplo n.º 2
0
 private void ShowInfo(int Id)
 {
     Maticsoft.BLL.UserRelate bll=new Maticsoft.BLL.UserRelate();
     Maticsoft.Model.UserRelate model=bll.GetModel(Id);
     this.lblId.Text=model.Id.ToString();
     this.txtUserId.Text=model.UserId.ToString();
     this.txtRelateUserId.Text=model.RelateUserId.ToString();
     this.chkIsDelete.Checked=model.IsDelete;
     this.txtCreateTime.Text=model.CreateTime.ToString();
 }
Ejemplo n.º 3
0
 private void ShowInfo(int Id)
 {
     Maticsoft.BLL.UserRelate   bll   = new Maticsoft.BLL.UserRelate();
     Maticsoft.Model.UserRelate model = bll.GetModel(Id);
     this.lblId.Text           = model.Id.ToString();
     this.txtUserId.Text       = model.UserId.ToString();
     this.txtRelateUserId.Text = model.RelateUserId.ToString();
     this.chkIsDelete.Checked  = model.IsDelete;
     this.txtCreateTime.Text   = model.CreateTime.ToString();
 }
Ejemplo n.º 4
0
 private void ShowInfo(int Id)
 {
     Maticsoft.BLL.UserRelate   bll   = new Maticsoft.BLL.UserRelate();
     Maticsoft.Model.UserRelate model = bll.GetModel(Id);
     this.lblId.Text           = model.Id.ToString();
     this.lblUserId.Text       = model.UserId.ToString();
     this.lblRelateUserId.Text = model.RelateUserId.ToString();
     this.lblIsDelete.Text     = model.IsDelete?"是":"否";
     this.lblCreateTime.Text   = model.CreateTime.ToString();
 }
Ejemplo n.º 5
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

            if (!PageValidate.IsNumber(txtUserId.Text))
            {
                strErr += "UserId格式错误!\\n";
            }
            if (!PageValidate.IsNumber(txtRelateUserId.Text))
            {
                strErr += "RelateUserId格式错误!\\n";
            }
            if (!PageValidate.IsDateTime(txtCreateTime.Text))
            {
                strErr += "CreateTime格式错误!\\n";
            }

            if (strErr != "")
            {
                MessageBox.Show(this, strErr);
                return;
            }
            int      Id           = int.Parse(this.lblId.Text);
            int      UserId       = int.Parse(this.txtUserId.Text);
            int      RelateUserId = int.Parse(this.txtRelateUserId.Text);
            bool     IsDelete     = this.chkIsDelete.Checked;
            DateTime CreateTime   = DateTime.Parse(this.txtCreateTime.Text);


            Maticsoft.Model.UserRelate model = new Maticsoft.Model.UserRelate();
            model.Id           = Id;
            model.UserId       = UserId;
            model.RelateUserId = RelateUserId;
            model.IsDelete     = IsDelete;
            model.CreateTime   = CreateTime;

            Maticsoft.BLL.UserRelate bll = new Maticsoft.BLL.UserRelate();
            bll.Update(model);
            Maticsoft.Common.MessageBox.ShowAndRedirect(this, "保存成功!", "list.aspx");
        }
Ejemplo n.º 6
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr="";
            if(!PageValidate.IsNumber(txtUserId.Text))
            {
                strErr+="UserId格式错误!\\n";
            }
            if(!PageValidate.IsNumber(txtRelateUserId.Text))
            {
                strErr+="RelateUserId格式错误!\\n";
            }
            if(!PageValidate.IsDateTime(txtCreateTime.Text))
            {
                strErr+="CreateTime格式错误!\\n";
            }

            if(strErr!="")
            {
                MessageBox.Show(this,strErr);
                return;
            }
            int Id=int.Parse(this.lblId.Text);
            int UserId=int.Parse(this.txtUserId.Text);
            int RelateUserId=int.Parse(this.txtRelateUserId.Text);
            bool IsDelete=this.chkIsDelete.Checked;
            DateTime CreateTime=DateTime.Parse(this.txtCreateTime.Text);

            Maticsoft.Model.UserRelate model=new Maticsoft.Model.UserRelate();
            model.Id=Id;
            model.UserId=UserId;
            model.RelateUserId=RelateUserId;
            model.IsDelete=IsDelete;
            model.CreateTime=CreateTime;

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