Beispiel #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (!IsPostBack)
     {
         if (Request.QueryString["st"] != null)
         {
             string            strid = Request.QueryString["st"];
             NCPEP.Model.T_hzs model = new NCPEP.Model.T_hzs();
             NCPEP.Bll.T_hzs   bll   = new NCPEP.Bll.T_hzs();
             model           = bll.GetModel(int.Parse(strid));
             this.hdzb.Value = model.dizhi;
             strname         = model.mingcheng;
             txtx.Text       = model.zuobiaox;
             txty.Text       = model.zuobiaoy;
         }
     }
 }
Beispiel #2
0
 protected void Button1_Click(object sender, EventArgs e)
 {
     if (Request.QueryString["st"] != null)
     {
         string            strid = Request.QueryString["st"];
         NCPEP.Model.T_hzs model = new NCPEP.Model.T_hzs();
         NCPEP.Bll.T_hzs   bll   = new NCPEP.Bll.T_hzs();
         model = bll.GetModel(int.Parse(strid));
         if (!string.IsNullOrEmpty(txtx.Text))
         {
             model.zuobiaox = txtx.Text;
         }
         if (!string.IsNullOrEmpty(txty.Text))
         {
             model.zuobiaoy = txty.Text;
         }
         bll.Update(model);
         MessageBox.ShowAndRedirect(this, "设置成功!", "list.aspx?pg=" + Request.QueryString["pg"] + "");
     }
 }
Beispiel #3
0
 /// <summary>
 /// 更新一条数据
 /// </summary>
 public bool Update(NCPEP.Model.T_hzs model)
 {
     return(dal.Update(model));
 }
Beispiel #4
0
 /// <summary>
 /// 增加一条数据
 /// </summary>
 public int Add(NCPEP.Model.T_hzs model)
 {
     return(dal.Add(model));
 }