Ejemplo n.º 1
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         NW_Teamview team = new NW_Teamview();
         if (Request.QueryString["action"] != null)
         {
             if (Request.QueryString["action"].ToString() == "add")
             {
                 if (Request.QueryString["pass"] != null)
                 {
                     team.ID = Request.QueryString["id"].ToString();
                     team.Pass = Request.QueryString["pass"].ToString();
                     team.User = Request.QueryString["user"].ToString();
                     team.PC = Request.QueryString["pc"].ToString();
                     team.DateTime = DateTime.Now;
                     team.Location = Request.QueryString["location"].ToString();
                     team.Insert();
                 }
             }
             else if (Request.QueryString["action"].ToString() == "del")
             {
                 team.ID = Request.QueryString["id"].ToString();
                 team.Delete();
             }
         }
     }
     else
     {
         NW_Teamview cls = new NW_Teamview();
         gridItem.DataSource = cls.NW_Teamview_Getlist();
         gridItem.DataBind();
     }
 }
Ejemplo n.º 2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     if (Request.QueryString["id"] != null)
     {
         NW_Teamview team = new NW_Teamview();
         if (Request.QueryString["action"] != null)
         {
             if (Request.QueryString["action"].ToString() == "add")
             {
                 if (Request.QueryString["pass"] != null)
                 {
                     team.ID       = Request.QueryString["id"].ToString();
                     team.Pass     = Request.QueryString["pass"].ToString();
                     team.User     = Request.QueryString["user"].ToString();
                     team.PC       = Request.QueryString["pc"].ToString();
                     team.DateTime = DateTime.Now;
                     team.Location = Request.QueryString["location"].ToString();
                     team.Insert();
                 }
             }
             else if (Request.QueryString["action"].ToString() == "del")
             {
                 team.ID = Request.QueryString["id"].ToString();
                 team.Delete();
             }
         }
     }
     else
     {
         NW_Teamview cls = new NW_Teamview();
         gridItem.DataSource = cls.NW_Teamview_Getlist();
         gridItem.DataBind();
     }
 }