private void btn_close_AddGrid_Click(object sender, RoutedEventArgs e) { Tab_Control.BlurDisable(new TimeSpan(0, 0, 0, 0, 30), TimeSpan.Zero); Grid_ClientDetails.Visibility = Visibility.Hidden; }
private void btn_additional_details_Click(object sender, RoutedEventArgs e) { if (Grid_ClientDetails.Visibility == Visibility.Hidden) { if (Tab_Control.SelectedIndex == 1) { Tab_Control.BlurApply(100, new TimeSpan(0, 0, 0, 0, 200), TimeSpan.Zero); Grid_ClientDetails.Visibility = Visibility.Visible; } else { Tab_Control.BlurApply(30, new TimeSpan(0, 0, 0, 0, 200), TimeSpan.Zero); Grid_ClientDetails.Visibility = Visibility.Visible; } } else { Tab_Control.BlurDisable(new TimeSpan(0, 0, 0, 0, 30), TimeSpan.Zero); Grid_ClientDetails.Visibility = Visibility.Hidden; } MySqlConnection connection = new MySqlConnection(Class_GlobalVars.Conn_string); string query_SelectFromColumnMaster = "select * from customer_info.customer_master"; try { connection.Open(); MySqlCommand command = new MySqlCommand(query_SelectFromColumnMaster, connection); command.ExecuteNonQuery(); MySqlDataAdapter adapter = new MySqlDataAdapter(command); DataTable dt = new DataTable("fapl_customers.customer_master"); adapter.Fill(dt); List <view_Customers> items = new List <view_Customers>(); foreach (DataRowView dr in dt.DefaultView) { items.Add(new view_Customers() { Tool_no = Convert.ToString(dr[1]), Customer_name = Convert.ToString(dr[2]), Site_address = Convert.ToString(dr[3]), process_type = Convert.ToString(dr[4]), total_zones = Convert.ToString(dr[5]), max_PTL = Convert.ToString(dr[6]), total_PTL = Convert.ToString(dr[7]), HHT = Convert.ToString(dr[8]), License_from = Convert.ToDateTime(Convert.ToString(dr[9])).ToString("dd/MM/yyyy"), License_to = Convert.ToDateTime(Convert.ToString(dr[10])).ToString("dd/MM/yyyy"), img_path = Convert.ToString(dr[11]), }); } itemsControl_ViewCustomers.ItemsSource = items; CollectionView view = (CollectionView)CollectionViewSource.GetDefaultView(itemsControl_ViewCustomers.ItemsSource); view.Filter = UserFilter; } catch (Exception ex) { MessageBox.Show(ex.Message); } }