Beispiel #1
0
        private void button_Copy1_Click(object sender, RoutedEventArgs e)
        {
            Wiin_Addproduct wn = new Wiin_Addproduct();

            wn.window_starte = 1;
            wn.ShowDialog();
            ShowCustomerINfo(SearchforProduct);
        }
Beispiel #2
0
        private void button_Copy_Click(object sender, RoutedEventArgs e)
        {
            object item = dataGrid_Product.SelectedItem;

            if (item == null)
            {
                MessageBox.Show("لطفا کالایی را انتخاب کنید", "راهنمایی", MessageBoxButton.OK, MessageBoxImage.Information);
                return;
            }
            Wiin_Addproduct w = new Wiin_Addproduct();

            w.window_starte = 2;
            w.ProudcatID    = Convert.ToInt32((dataGrid_Product.SelectedCells[0].Column.GetCellContent(item) as TextBlock).Text);
            w.ProductName   = (dataGrid_Product.SelectedCells[1].Column.GetCellContent(item) as TextBlock).Text;
            w.ProudactDesc  = (dataGrid_Product.SelectedCells[2].Column.GetCellContent(item) as TextBlock).Text;
            w.ShowDialog();

            ShowCustomerINfo(SearchforProduct);
        }