Beispiel #1
0
 private void ShowInfo(long Id)
 {
     Maticsoft.BLL.Thumb bll=new Maticsoft.BLL.Thumb();
     Maticsoft.Model.Thumb model=bll.GetModel(Id);
     this.lblId.Text=model.Id.ToString();
     this.txtTravelPartId.Text=model.TravelPartId.ToString();
     this.txtUserId.Text=model.UserId.ToString();
     this.chkIsDelete.Checked=model.IsDelete;
     this.txtCreateTime.Text=model.CreateTime.ToString();
 }
Beispiel #2
0
 private void ShowInfo(long Id)
 {
     Maticsoft.BLL.Thumb bll=new Maticsoft.BLL.Thumb();
     Maticsoft.Model.Thumb model=bll.GetModel(Id);
     this.lblId.Text=model.Id.ToString();
     this.lblTravelPartId.Text=model.TravelPartId.ToString();
     this.lblUserId.Text=model.UserId.ToString();
     this.lblIsDelete.Text=model.IsDelete?"是":"否";
     this.lblCreateTime.Text=model.CreateTime.ToString();
 }
Beispiel #3
0
 private void ShowInfo(long Id)
 {
     Maticsoft.BLL.Thumb   bll   = new Maticsoft.BLL.Thumb();
     Maticsoft.Model.Thumb model = bll.GetModel(Id);
     this.lblId.Text           = model.Id.ToString();
     this.txtTravelPartId.Text = model.TravelPartId.ToString();
     this.txtUserId.Text       = model.UserId.ToString();
     this.chkIsDelete.Checked  = model.IsDelete;
     this.txtCreateTime.Text   = model.CreateTime.ToString();
 }
Beispiel #4
0
 private void ShowInfo(long Id)
 {
     Maticsoft.BLL.Thumb   bll   = new Maticsoft.BLL.Thumb();
     Maticsoft.Model.Thumb model = bll.GetModel(Id);
     this.lblId.Text           = model.Id.ToString();
     this.lblTravelPartId.Text = model.TravelPartId.ToString();
     this.lblUserId.Text       = model.UserId.ToString();
     this.lblIsDelete.Text     = model.IsDelete?"是":"否";
     this.lblCreateTime.Text   = model.CreateTime.ToString();
 }
Beispiel #5
0
        public void btnSave_Click(object sender, EventArgs e)
        {
            string strErr = "";

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

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


            Maticsoft.Model.Thumb model = new Maticsoft.Model.Thumb();
            model.Id           = Id;
            model.TravelPartId = TravelPartId;
            model.UserId       = UserId;
            model.IsDelete     = IsDelete;
            model.CreateTime   = CreateTime;

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

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

            Maticsoft.Model.Thumb model=new Maticsoft.Model.Thumb();
            model.Id=Id;
            model.TravelPartId=TravelPartId;
            model.UserId=UserId;
            model.IsDelete=IsDelete;
            model.CreateTime=CreateTime;

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