Beispiel #1
0
        private void btnThemHangHoa_Click(object sender, RoutedEventArgs e)
        {
            UserControl usc = new UI_ThemHangHoa();

            UI_ManHinhChinh.gridMain.Children.Clear();
            UI_ManHinhChinh.gridMain.Children.Add(usc);
        }
Beispiel #2
0
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (dgvHangHoa.SelectedItem != null)
     {
         DTO_HangHoa obj = new DTO_HangHoa();
         obj = dgvHangHoa.SelectedItem as DTO_HangHoa;
         if (obj.TrangThai == true)
         {
             UserControl usc = new UI_ThemHangHoa(dgvHangHoa.SelectedItem as DTO_HangHoa);
             UI_ManHinhChinh.gridMain.Children.Clear();
             UI_ManHinhChinh.gridMain.Children.Add(usc);
         }
         else
         {
             MessageBox.Show("Mặt hàng đã ngừng kinh doanh!");
         }
     }
 }