Esempio n. 1
0
 private void btnSignIn_Click(object sender, EventArgs e)
 {
     if (!CheckData())
     {
         return;
     }
     GlobalConstants.printerName = Properties.Settings.Default.PrinterName;
     GlobalConstants.portCOM     = Properties.Settings.Default.PortCOM;
     //GlobalConstants.portCOM = "COM1";
     GlobalConstants.languageLibrarys = _languageLibraryRepository.GetAll().ToList();
     GlobalConstants.language         = Properties.Settings.Default.Language;
     GlobalConstants.shifts           = _shiftRepository.GetAll().ToList();
     GlobalConstants.machineName      = Environment.MachineName;
     GlobalConstants.machineNo        = _machineRepository.GetMachineNo(GlobalConstants.machineName);
     GlobalConstants.VN = Properties.Settings.Default.VN;
     GlobalConstants.mustUseBarcodeReader       = Properties.Settings.Default.MustUseBarcodeReader;
     GlobalConstants.countTimeReset             = Properties.Settings.Default.CountTimeReset;
     Properties.Settings.Default.KeepMeSignedIn = chkKeepMeSignedIn.Checked;
     if (chkKeepMeSignedIn.Checked)
     {
         Properties.Settings.Default.Username = txtUsername.Text.Trim();
         Properties.Settings.Default.Password = txtPassword.Text.Trim();
     }
     else
     {
         Properties.Settings.Default.Username = "";
         Properties.Settings.Default.Password = "";
     }
     Properties.Settings.Default.Save();
     DialogResult = DialogResult.OK;
     Close();
 }
Esempio n. 2
0
 private void Search()
 {
     _projectDataContext        = new ProjectDataContext();
     _languageLibraryRepository = new LanguageLibraryRepository(_projectDataContext);
     dgvDuLieu.DataSource       = _languageLibraryRepository.GetAll().OrderBy(_ => _.Vietnamese);
     Control();
 }
Esempio n. 3
0
        private void frmSignIn_Load(object sender, EventArgs e)
        {
            _userRepository                 = new UserRepository(_projectDataContext);
            _languageLibraryRepository      = new LanguageLibraryRepository(_projectDataContext);
            GlobalConstants.languageLibrary = _languageLibraryRepository.GetAll().ToList();

            GlobalConstants.language = Properties.Settings.Default.Language;
            LoadLanguage(GlobalConstants.language);
            LanguageTranslate.ChangeLanguageForm(this);
            lblTieuDe.Text            = Properties.Settings.Default.Company;
            chkKeepMeSignedIn.Checked = Properties.Settings.Default.KeepMeSignedIn;
            if (chkKeepMeSignedIn.Checked)
            {
                txtUsername.Text = Properties.Settings.Default.Username;
                txtPassword.Text = Properties.Settings.Default.Password;
            }
        }
Esempio n. 4
0
 private void Search()
 {
     dgvDuLieu.DataSource = _languageLibraryRepository.GetAll();
     Control();
 }