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();
     _shiftRepository     = new ShiftRepository(_projectDataContext);
     dgvDuLieu.DataSource = _shiftRepository.GetAll().OrderBy(_ => _.ShiftNo);
     Control();
 }
Esempio n. 3
0
 private void LoadShiftData()
 {
     cbbShift.DataSource    = _shiftRepository.GetAll().OrderBy(_ => _.ShiftNo).ToList();
     cbbShift.SelectedIndex = 0;
 }