public void clerar() { old1.Clear(); old2.Clear(); old3.Clear(); old4.Clear(); New1.Clear(); New2.Clear(); New3.Clear(); New4.Clear(); Con1.Clear(); Con2.Clear(); Con3.Clear(); Con4.Clear(); button3.Hide(); }
public ActionResult DeleteConfirmed(int id) { New1 new1 = db.users.Find(id); db.users.Remove(new1); db.SaveChanges(); return(RedirectToAction("Index")); }
private void New2_KeyDown(object sender, KeyEventArgs e) { if (e.KeyCode == Keys.Back) { New1.Clear(); New1.Focus(); p = 1; } }
// // GET: /Us/Delete/5 public ActionResult Delete(int id = 0) { New1 new1 = db.users.Find(id); if (new1 == null) { return(HttpNotFound()); } return(View(new1)); }
public ActionResult Edit(New1 new1) { if (ModelState.IsValid) { db.Entry(new1).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(new1)); }
public ActionResult Create(New1 new1) { if (ModelState.IsValid) { db.users.Add(new1); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(new1)); }
private void New4_TextChanged(object sender, EventArgs e) { if (old1.Text == "" && old2.Text == "" & old3.Text == "" && old4.Text == "") { label16.Visible = true; label16.Text = "Fill all text !"; New1.Clear(); New2.Clear(); New3.Clear(); New4.Clear(); New1.Focus(); } else { label16.Visible = false; Con1.Focus(); } }
private void textBox1_TextChanged(object sender, EventArgs e) { if (old1.Text == "" && old2.Text == "" & old3.Text == "" && old4.Text == "") { label16.Visible = true; label16.Text = "Password is in complite !"; old1.Clear(); old2.Clear(); old3.Clear(); old4.Clear(); old1.Focus(); } else { if (con.State == ConnectionState.Closed) { con.Open(); } string a1 = old1.Text.ToString() + old2.Text.ToString() + old3.Text.ToString() + old4.Text.ToString(); SqlCommand cmd = new SqlCommand("Select Password from PasswordCheek", con); string Password = cmd.ExecuteScalar().ToString(); // MessageBox.Show("Data"+a1+ "get"+ Password); if (a1 == Password) { New1.Focus(); label16.Visible = false; } else { label16.Visible = true; label16.Text = "Password is in complite !"; old1.Clear(); old2.Clear(); old3.Clear(); old4.Clear(); old1.Focus(); } } }
private void textBox9_TextChanged(object sender, EventArgs e) { New1.Focus(); }