Exemplo n.º 1
0
 static AddVatTu()
 {
     if (signleton == null)
     {
         signleton = new AddVatTu();
     }
 }
Exemplo n.º 2
0
 private void btnEdit_Click(object sender, RoutedEventArgs e)
 {
     if (dgContent.CurrentItem != null)
     {
         tableLog.SetRowChange(((DataRowView)dgContent.CurrentItem).Row);
         AddVatTu addKhachHang = new AddVatTu(((DataRowView)dgContent.CurrentItem).Row);
         addKhachHang.dataGrid = this.dgContent;
         addKhachHang.Show();
     }
     else
     {
         MessageBox.Show("Không có hàng nào được chọn!");
     }
 }
Exemplo n.º 3
0
        private AddVatTu()
        {
            this.DataContext = new ViewModel();
            InitializeComponent();
            QLVTDataSet.LoaiHangDataTable loaiHangs = new QLVTDataSet.LoaiHangDataTable();
            Common.LoaiHangTableAdapter.Connection = Common.connection;
            Common.LoaiHangTableAdapter.Fill(loaiHangs);
            dgLoaiMatHang.ItemsSource = loaiHangs;

            Id = 0;

            EventHandler eventHandler = (o, i) => { signleton = new AddVatTu(); };

            this.Closed += eventHandler;
        }