Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     _role = CheckAccount();
     if (string.IsNullOrEmpty(Request["zId"]))
     {
         // if (!string.IsNullOrEmpty(Request["zId"]) && !IsPostBack)
         Response.Redirect("~/About.aspx");
     }
     _wz = Int32.Parse(Request["zId"]);
     if (!IsPostBack)
     {
         App_Code.Base db   = new App_Code.Base(WebConfigurationManager.ConnectionStrings["DefaultConnection"].ToString());
         DataTable     data = db.GetDocUm(_wz);
         if (data.Rows.Count < 1)
         {
             Response.Redirect("~/About.aspx");
         }
         Id.Text       = _wz.ToString();
         name.Text     = data.Rows[0]["name"].ToString();
         namefile.Text = data.Rows[0]["namefile"].ToString();
         status.Text   = data.Rows[0]["status"].ToString();
         primm.Text    = data.Rows[0]["primm"].ToString();
         if (_role == "ODS_tsg")
         {
             phPodp.Visible = true;
         }
         if (_role == "Cadry" || _role == "Manager")
         {
             DelDoc.Visible = true;
         }
     }
 }