private void button1_Click(object sender, RoutedEventArgs e) { SqlCommand objCommand1 = new SqlCommand(); objCommand1.Connection = objConnection; objCommand1.CommandText = "UPDATE All_End_EzareBeShartTamlik SET S6_Datesodor=@S6_Datesodor WHERE (S1_idshobe = '" + id_idshobe + "') AND (S1_idmen = '" + id_idmen + "') AND (S1_rad = '" + id_Contract + "')"; objCommand1.CommandType = CommandType.Text; objCommand1.Parameters.AddWithValue("@S6_Datesodor", u_set.control_date_end(persianDatePicker1.Text)); objConnection.Open(); objCommand1.ExecuteNonQuery(); objConnection.Close(); u_set.u_amal_register("2", this.Title, id_Contract, "5", "ویرایش"); NewCar f1 = new NewCar(); f1.Title = "اطلاعات خودرو جایگزین اجاره به شرط تملیک قرارداد شماره : " + id_Contract; f1.selkar = "4"; f1.id_idshobe = id_idshobe; f1.id_idmen = id_idmen; f1.id_Contract = id_Contract; f1.expander2.Visibility = button2.Visibility = System.Windows.Visibility.Hidden; f1.expander3.Visibility = button2.Visibility = System.Windows.Visibility.Hidden; f1.Show(); this.Hide(); }
private void button3_Click(object sender, RoutedEventArgs e) { NewCar f1 = new NewCar(); f1.Title = button3.Content.ToString() + " قرارداد شماره : " + id_Contract; f1.selkar = "5"; f1.id_idshobe = id_idshobe; f1.id_Contract = id_Contract; f1.Show(); }
private void button3_Click(object sender, RoutedEventArgs e) { button3.IsEnabled = false; Reg_Data_Amin(); NewCar f1 = new NewCar(); f1.Title = button3.Content.ToString() + " قرارداد شماره : " + id_Contract; f1.selkar = "5"; f1.id_idshobe = id_1_idshobe; f1.id_Contract = id_Contract; f1.Show(); this.Hide(); button3.IsEnabled = true; }