using System; using System.Collections; using System.Collections.Generic; using System.Data; using System.Data.OleDb; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using System.Configuration; using System.IO; using System.Linq; using System.Globalization; public partial class admin_project__reg : MyWeb.config { private Model.ezEntities _db = new Model.ezEntities(); protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (isStrNull(Request["num"])) { Response.Redirect("index.aspx" + rtnQueryString("num")); } else { int _num = Val(Request["num"]); var qry = _db.project_sub.AsEnumerable(); var prod = qry.Where(q => q.num == _num).FirstOrDefault(); if (prod != null) { if (!string.IsNullOrEmpty( prod.pic1)) { Image1.Visible = true; Image1.ImageUrl = Model.project.Dir + "/" + prod.pic1; } if (prod.pro_id.HasValue) project_name.Text = prod.project.subject; if (prod.uptime.HasValue) uptime.Text = prod.uptime.Value.ToString("yyyy-MM-dd"); subject.Text = prod.subject; word.Text = prod.word; } else { Response.Redirect("index.aspx"); } } } } protected void goback_Click(object sender, EventArgs e) { Response.Redirect("index.aspx?page=" + Convert.ToString(Request["page"])); } }