protected void Button1_Click(object sender, EventArgs e) { User c = new User(); c.AuditID = int.Parse(GridView1.SelectedRow.Cells[1].Text); c.DeleteAudit(); UpdateGrid(); }
void UpdateGrid() { User b = new User(); b.Username = Session["Name"].ToString(); GridView1.DataSource = b.GetAccount(); GridView1.DataBind(); }
protected void Button1_Click(object sender, EventArgs e) { User c = new User(); c.Username = Session["Name"].ToString(); c.DeleteAccount(); Response.Redirect("WebForm1.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { ISPROG3_Final.User tmpUser = new User(); tmpUser.Username = txtUsername.Text; tmpUser.Password = txtPassword.Text; if (tmpUser.Login()) { if (tmpUser.UserType == "Manager") { Session.Add("User", tmpUser); Session.Add("Name", txtUsername.Text); Response.Redirect("WebForm4.aspx"); } else if (tmpUser.UserType == "Client") { Session.Add("User", tmpUser); Session.Add("Name", txtUsername.Text); Response.Redirect("WebForm5.aspx"); } else if (tmpUser.UserType == "Sales Clerk") { Session.Add("User", tmpUser); Session.Add("Name", txtUsername.Text); Response.Redirect("WebForm10.aspx"); } else if (tmpUser.UserType == "Inventory Clerk") { Session.Add("User", tmpUser); Session.Add("Name", txtUsername.Text); Response.Redirect("WebForm11.aspx"); } } }
protected void Button1_Click1(object sender, EventArgs e) { User n = new User(); n.Name = TextBox1.Text; n.Username = TextBox2.Text; n.Password = TextBox3.Text; n.UserType = DropDownList1.Text; n.Register(); Response.Redirect("Webform14.aspx"); }
protected void Button1_Click(object sender, EventArgs e) { User b = new User(); b.Name = TextBox1.Text; b.Password = TextBox2.Text; b.Birthday = TextBox3.Text; b.Email = TextBox4.Text; b.Username = Session["Name"].ToString(); b.EditAccount(); UpdateGrid(); }
void UpdateGrid() { User b = new User(); GridView1.DataSource = b.GetAudit(); GridView1.DataBind(); }