Example #1
0
 protected void btn_save_Click(object sender, EventArgs e)
 {
     JpPhotography JpPhotography = new JpPhotography();
     JpPhotography.hy_address = this.lb_location.Text;
     JpPhotography.hy_addtime = DateTime.Now;
     JpPhotography.hy_content = this.txtData.Value;
     JpPhotography.hy_ifsh = 0;
     DataTable dt = JpPhotography.GetMaxSort();
     if (dt.Rows.Count > 0)
     {
         JpPhotography.hy_sort = Convert.ToInt32(dt.Rows[0]["hy_sort"].ToString()) + 1;
     }
     else
     {
         JpPhotography.hy_sort = 1;
     }
     JpPhotography.hy_uid = "";
     JpPhotography.docid = this.txtDocid.Value;
     JpPhotography.Insert();
     Response.Write("<script>alert('保存成功!');</script>");
 }