Exemplo n.º 1
0
 private void nbiDetail_Click(object sender, System.EventArgs e)
 {
     b                   = new UCNV();
     usnv.Content        = b;
     biNV.IsEnabled      = false;
     nbiDetail.IsEnabled = false;
     nbiList.IsEnabled   = true;
 }
Exemplo n.º 2
0
        private void biNV_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            b            = new UCNV();
            usnv.Content = b;

            biNV.IsEnabled    = false;
            nbiList.IsEnabled = true;
            biKH.IsEnabled    = true;
            biBDS.IsEnabled   = true;
            lpmenu.IsEnabled  = true;
        }
Exemplo n.º 3
0
        private void biNV_ItemClick(object sender, DevExpress.Xpf.Bars.ItemClickEventArgs e)
        {
            b            = new UCNV();
            usnv.Content = b;

            biNV.IsEnabled    = false;
            nbiList.IsEnabled = true;
            biKH.IsEnabled    = true;
            biBDS.IsEnabled   = true;
            lpmenu.IsEnabled  = true;
            biKG.IsEnabled    = true;
            if (docGroup.Items.Count >= 2)
            {
                docGroup.Items.Remove(panel);
            }
        }
Exemplo n.º 4
0
 private void btnThem_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         kiemtra();
         NhanVien nv = new NhanVien();
         nv.taikhoan = txtTK.Text;
         nv.matkhau  = "1";
         nv.tennv    = txtTen.Text;
         nv.sdt      = int.Parse(txtSDT.Text);
         nv.diachi   = txtDiachi.Text;
         nv.ngaysinh = dtpNS.SelectedDate.Value;
         if (rdoNam.IsChecked == true)
         {
             nv.gioitinh = true;
         }
         else
         {
             nv.gioitinh = false;
         }
         nv.email    = txtEmail.Text;
         nv.doanhthu = 0;
         nv.quyen    = false;
         if (img.Source == null)
         {
             nv.hinh = null;
         }
         else
         {
             nv.hinh = ConvertToBytes(img.Source as BitmapImage);
         }
         dc.NhanViens.InsertOnSubmit(nv);
         dc.SubmitChanges();
         MainWindow main = new MainWindow();
         UCNV       uc   = new UCNV();
         main.usnv.Content          = uc;
         ucl.grid.ItemsSource       = new NhanVienModelView().DSNVList;
         uc.gridControl.ItemsSource = new NhanVienModelView().DSNV;
         this.Close();
     }
     catch
     {
         return;
     }
 }