Ejemplo n.º 1
0
 static AddDatHang()
 {
     if (signleton == null)
     {
         signleton = new AddDatHang();
     }
 }
Ejemplo n.º 2
0
 public void add()
 {
     AddDatHang.Singleton.DatHang  = this;
     AddDatHang.Singleton.dataGrid = dgContent;
     AddDatHang.Singleton.Hide();
     AddDatHang.Singleton.Show();
     AddDatHang.GetWindow(this).Closed += (o, ev) => { AddKho.Singleton.Close(); };
 }
Ejemplo n.º 3
0
        private AddDatHang()
        {
            InitializeComponent();
            ViewModel viewModel = new ViewModel();

            this.DataContext         = viewModel;
            dgNhaCungCap.ItemsSource = Common.NhaCungCapDataTable;
            dgMatHang.ItemsSource    = Common.MatHangDataTable;

            dgCTDH.ItemsSource = ctdh = new QLVTDataSet.CTDatHangDataTable();

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

            this.Closed += eventHandler;

            //viewModel.NhaCungCap = dgNhaCungCap.SelectedValue;
            //viewModel.ChiTietDatHang = dgCTDH.SelectedValue;
        }