コード例 #1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (string.IsNullOrEmpty(Request["zId"]))
     {
         // if (!string.IsNullOrEmpty(Request["zId"]) && !IsPostBack)
         Response.Redirect("~/About.aspx");
     }
     _wz = Int32.Parse(Request["zId"]);
     if (User.Identity.Name == "manager")
     {
         Button1.Visible = true;
     }
     if (!IsPostBack)
     {
         App_Code.Base db   = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
         DataTable     data = db.GetPart(_wz);
         if (data.Rows.Count < 1)
         {
             Response.Redirect("~/About.aspx");
         }
         //    Id.Text = _wz.ToString();
         Name.Text     = data.Rows[0]["Name"].ToString();
         NumEvent.Text = data.Rows[0]["NumEvent"].ToString();
         NameFile.Text = data.Rows[0]["namefoto"].ToString();
         NumID.Text    = data.Rows[0]["NumID"].ToString();
         Obz.Text      = data.Rows[0]["Obz"].ToString();
         Kol.Text      = data.Rows[0]["Kol"].ToString();
     }
 }