private void Lname_PreviewMouseDown(object sender, MouseButtonEventArgs e)//cleaning the text box so you can write the ID { if (Lname.Text == "Enter Your Last Name") { Lname.Clear(); } }
private void button2_Click(object sender, EventArgs e) { Lno.Clear(); Lname.Clear(); Wr.Clear(); // Lpress.Clear(); Lbz.Clear(); Ldate.Clear(); }
private void button14_Click(object sender, EventArgs e) { if (ValidateChildren(ValidationConstraints.Enabled) && Lname.Text == "" || level.Text == "" || LecID.Text == "" || center.Text == "" || faculty.Text == "" || department.Text == "" || building.Text == "") { MessageBox.Show("Please fill out the Empty Field(s)", "Unable to Submit", MessageBoxButtons.OK, MessageBoxIcon.Exclamation, MessageBoxDefaultButton.Button1); } else { if (Mode == true) { String name = Lname.Text; String lvl = level.SelectedItem.ToString(); String id = LecID.Text; String cntr = center.SelectedItem.ToString(); String fclty = faculty.SelectedItem.ToString(); String dep = department.SelectedItem.ToString(); String bldn = building.SelectedItem.ToString(); String rank = level.Text + "." + LecID.Text; sql = "insert into Lec_details(Lecturer_Name,Level,LecturerID,Center,Faculty,Department,Building,Rank)values(@Lecturer_Name,@Level,@LecturerID,@Center,@Faculty,@Department,@Building,@Rank)"; con.Open(); cmd = new SqlCommand(sql, con); cmd.Parameters.AddWithValue("@Lecturer_Name", name); cmd.Parameters.AddWithValue("@Level", lvl); cmd.Parameters.AddWithValue("@LecturerID", id); cmd.Parameters.AddWithValue("@Center", cntr); cmd.Parameters.AddWithValue("@Faculty", fclty); cmd.Parameters.AddWithValue("@Department", dep); cmd.Parameters.AddWithValue("@Building", bldn); cmd.Parameters.AddWithValue("@Rank", rank); cmd.ExecuteNonQuery(); MessageBox.Show("Data Insert Successfully!!"); con.Close(); LecID.Clear(); Lname.Clear(); level.SelectedIndex = -1; center.SelectedIndex = -1; faculty.SelectedIndex = -1; department.SelectedIndex = -1; building.SelectedIndex = -1; } } }
private void ClearDataproduct2() { ID.Clear(); name.Clear(); Lname.Clear(); Ass.Clear(); Email.Clear(); Tal.Clear(); number.Clear(); Pass.Clear(); }
internal void Profiletitle() { Commondriver.Excellib.PopulateInCollection(Base.Excelpath, "ProfilePage data"); Dropdown.Click(); Commondriver.Wait(10); Fname.Clear(); Fname.SendKeys(Commondriver.Excellib.ReadData(2, "FirstName")); Lname.Clear(); Lname.SendKeys(Commondriver.Excellib.ReadData(2, "LastName")); Commondriver.Wait(10); TitleSave.Click(); Commondriver.Wait(10); }
private void Clear() { tabelTB.Clear(); //табел Lname.Clear(); //фио Fname.Clear(); Pname.Clear(); department.Clear(); //подраздел Occupat.Clear(); //должность salary.Clear(); //оклад dateBegin.Clear(); dateEnd.Clear(); adress.Clear(); education.Clear(); //образов numberTel.Clear(); family.Clear(); //сем полож child.Clear(); }