示例#1
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     cbbNhaCungCap.ItemsSource   = BUS_NhaCungCap.showData();
     txtTenNhanVien.Text         = Properties.Settings.Default.TenNhanVien;
     dpNgayLap.SelectedDate      = DateTime.Today.AddDays(0);
     dpNgayChinhSua.SelectedDate = DateTime.Today.AddDays(0);
 }
 public UI_LapPhieuDatHang(DTO_PhieuDatHang obj)
 {
     InitializeComponent();
     cbbNhaCungCap.ItemsSource = BUS_NhaCungCap.showData();
     getDataFromEditUI(obj);
     checkGroupCTPN(isNew = false, obj);
 }
示例#3
0
 private void clearPN()
 {
     generatePhieuNhapID();
     cbbNhaCungCap.ItemsSource   = BUS_NhaCungCap.showData();
     txtTenNhanVien.Text         = Properties.Settings.Default.TenNhanVien;
     dpNgayLap.SelectedDate      = DateTime.Today.AddDays(0);
     dpNgayChinhSua.SelectedDate = DateTime.Today.AddDays(0);
     cbbNhaCungCap.Text          = "";
     txtGhiChu.Clear();
 }
 public UI_LapPhieuDatHang()
 {
     InitializeComponent();
     generateID();
     cbbNhaCungCap.ItemsSource   = BUS_NhaCungCap.showData();
     txtTenNhanVien.Text         = Properties.Settings.Default.TenNhanVien;
     dpNgayLap.SelectedDate      = DateTime.Today.AddDays(0);
     dpNgayChinhSua.SelectedDate = DateTime.Today.AddDays(0);
     checkGroupCTPN(isNew        = true, item);
 }
示例#5
0
        private void btnDelete_Click(object sender, RoutedEventArgs e)
        {
            MessageBoxResult result = MessageBox.Show("Bạn có muốn xóa dòng này?", "Confirmation", MessageBoxButton.YesNo);

            if (result == MessageBoxResult.Yes)
            {
                if (dgvSuppliers.SelectedItem != null)
                {
                    DTO_NhaCungCap obj = dgvSuppliers.SelectedItem as DTO_NhaCungCap;
                    BUS_NhaCungCap.DeleteNCC(obj);
                    dgvSuppliers.ItemsSource = BUS_NhaCungCap.showData();
                }
            }
        }
示例#6
0
 public UI_NhaCungCap(Grid gridMain)
 {
     InitializeComponent();
     this.gridMain            = gridMain;
     dgvSuppliers.ItemsSource = BUS_NhaCungCap.showData();
 }
示例#7
0
 private void btnRefresh_Click(object sender, RoutedEventArgs e)
 {
     //dgvSuppliers.Rows.Clear();
     txtSearch.Clear();
     dgvSuppliers.ItemsSource = BUS_NhaCungCap.showData();
 }