示例#1
0
 private void DeleteCl_Click(object sender, EventArgs e)
 {
     using (SqlConnection Conect = new SqlConnection(@"Data Source=DESKTOP-78L61PQ\SQLEXPRESS;
     Initial Catalog=Sistema de Prestamos; Integrated Security=True;"))
     {
         Conect.Open();
         SqlCommand cmd = new SqlCommand("DeleteClients", Conect);
         cmd.CommandType = System.Data.CommandType.StoredProcedure;
         cmd.Parameters.AddWithValue("@Nombre", SearchBar.Text);
         cmd.ExecuteNonQuery();
         SearchBar.Clear();
     }
 }
示例#2
0
 private void button4_Click(object sender, EventArgs e)
 {
     showData($"select * from cliente where id = {int.Parse(SearchBar.Text)}");
     SearchBar.Clear();
 }
 /// <summary>
 /// fill the search box and click search button
 /// </summary>
 /// <param name="propertyName"></param>
 void FillSearchBoxAndCLickSearch(string propertyName)
 {
     SearchBar.Clear();
     SearchBar.SendKeys(propertyName);
     SearchButton.Click();
 }