public UI_ThemNhanVien(Grid gridMain, DTO_NhanVien obj)
        {
            InitializeComponent();
            DataContext                     = new TextFieldsViewModel();
            this.gridMain                   = gridMain;
            isChangingVisible               = false;
            cbbPermissionName.ItemsSource   = BUS_PhanQuyen.showData();
            cbbPermissionName.SelectedIndex = 0;
            if (obj == null)
            {
                AutoGenerateID();
                btnVisible.IsChecked = true;
                isNew = true;
            }
            else
            {
                txtEmployeesID.Text       = obj.MaNhanVien;
                txtEmployeesName.Text     = obj.TenNhanVien;
                txtEmployeesUserName.Text = obj.UserName;
                txtEmployeesPass.Password = obj.Password;
                cbbPermissionName.Text    = obj.TenPhanQuyen;

                if (obj.TrangThai == false)
                {
                    btnVisible.IsChecked           = false;
                    txtEmployeesID.FontStyle       = FontStyles.Oblique;
                    txtEmployeesName.FontStyle     = FontStyles.Oblique;
                    txtEmployeesUserName.FontStyle = FontStyles.Oblique;
                    txtEmployeesPass.FontStyle     = FontStyles.Oblique;
                    cbbPermissionName.FontStyle    = FontStyles.Oblique;
                }
                isNew = false;
            }
        }
Esempio n. 2
0
        public CashOut()
        {
            InitializeComponent();
            DataContext = new TextFieldsViewModel();

            setInitialValues();
        }
 public UI_ThemHangHoa()
 {
     InitializeComponent();
     DataContext = new TextFieldsViewModel();
     generateHangHoaID();
     isNew = true;
     loadCombobox();
 }
Esempio n. 4
0
 public UI_ThemPhieuNhap(Grid gridMain, DTO_PhieuNhap obj)
 {
     InitializeComponent();
     DataContext   = new TextFieldsViewModel();
     this.gridMain = gridMain;
     if (obj == null)
     {
         generatePhieuNhapID();
         checkGroupCTPN(isNew = true, item);
     }
     else
     {
         getDataFromEditUI(obj);
         checkGroupCTPN(isNew = false, obj);
     }
 }
 public UI_ThemNhaCungCap(Grid gridMain, DTO_NhaCungCap obj)
 {
     InitializeComponent();
     DataContext   = new TextFieldsViewModel();
     this.gridMain = gridMain;
     if (obj == null)
     {
         AutoGenerateID();
         isNew = true;
     }
     else
     {
         txtSupplierID.Text      = obj.MaNhaCungCap;
         txtSupplierName.Text    = obj.TenNhaCungCap;
         txtSupplierAddress.Text = obj.DiaChi;
         txtSupplierPhone.Text   = obj.SoDienThoai;
         txtSupplierEmail.Text   = obj.Email;
         isNew = false;
     }
 }
Esempio n. 6
0
 public TextFields()
 {
     InitializeComponent();
     DataContext = new TextFieldsViewModel();
 }
        public TextFields()
        {
            InitializeComponent();	        
			DataContext = new TextFieldsViewModel();			
		}
        public FieldsDemo()
        {
            this.InitializeComponent();

            DataContext = new TextFieldsViewModel();
        }
Esempio n. 9
0
 private void Window_Loaded(object sender, RoutedEventArgs e)
 {
     cbbTenHangHoa.ItemsSource = BUS_HangHoa.showData();
     DataContext = new TextFieldsViewModel();
 }
Esempio n. 10
0
 public ucSystemSettings()
 {
     InitializeComponent();
     DataContext = new TextFieldsViewModel();
 }
 public UI_ThayDoiMatKhau()
 {
     InitializeComponent();
     DataContext = new TextFieldsViewModel();
 }