public pl_windowThemHangHoa(vo_HangHoa _voHH)
        {
            try
            {
                bus_HH          = new bus_HangHoa();
                this.vo_HH      = _voHH;
                bus_LoaiHH      = new bus_LoaiHangHoa();
                this.cancelFlag = 1;
                InitializeComponent();
                this.tenHH.IsEnabled     = false;
                this.giaBan.IsEnabled    = false;
                this.giaGiam.IsEnabled   = false;
                this.giaVon.IsEnabled    = false;
                this.ghiChu.IsEnabled    = false;
                this.cboLoaiHH.IsEnabled = false;
                this.tonKho.IsEnabled    = false;
                this.btnDoiAnh.IsEnabled = false;

                this.btnThem.Visibility = Visibility.Hidden;

                this.cboLoaiHH.ItemsSource   = this.bus_LoaiHH.getAllLoaiHangHoa();
                this.cboLoaiHH.SelectedValue = vo_HH.IdLoaiHangHoa;
                this.DataContext             = this.vo_HH;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }
 public pl_ThemLoaiHangHoa()
 {
     InitializeComponent();
     this.bll_LoaiHH = new bll_LoaiHangHoa();
     this.initDataSource();
     this.DataContext = this.dataSource;
     this.createMaLoaiHH();
 }
Exemple #3
0
        public pl_windowThemLoaiHangHoa()
        {
            try
            {
                InitializeComponent();
                this.bus_LoaiHH = new bus_LoaiHangHoa();
                this.vo_loaiHH  = new vo_LoaiHangHoa();

                this.DataContext  = this.vo_loaiHH;
                this.vo_loaiHH.Id = this.bus_LoaiHH.GetLastesIDLoaiHH() + 1;
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Information);
            }
        }
        public pl_windowThemHangHoa()
        {
            try
            {
                bus_HH     = new bus_HangHoa();
                vo_HH      = new vo_HangHoa();
                bus_LoaiHH = new bus_LoaiHangHoa();

                InitializeComponent();
                this.lblLuu.Content    = " Lưu";
                this.btnLuu.Visibility = Visibility.Hidden;
                this.initValue();
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message, "Loi!", MessageBoxButton.OK, MessageBoxImage.Error);
            }
        }