private void RechargeGDV() { cmbAdminDept.DataSource = depts; dgvAdminLogs.DataSource = LogDao.GetLogs(); dgvAdminSum.DataSource = LogDao.Working(); dgvAdminSum2.DataSource = DeptDao.MostPopDept(); }
private void btnVigil_Click(object sender, EventArgs e) { try { int idUser = Convert.ToInt32(txtVigilUser.Text); bool isWorking = cmbVigilInOut.SelectedIndex == 0 ? true : false; double temp = Convert.ToDouble(txtVigilTemp.Text); LogDao.CreateLog(idUser, isWorking, temp); MessageBox.Show("Entrada registrada correctamente."); txtVigilUser.Text = ""; txtVigilTemp.Text = ""; } catch (Exception exception) { MessageBox.Show("Verifique que toda la información sea correcta."); } dgvVigil.DataSource = null; dgvVigil.DataSource = LogDao.GetLogs(); }
private void UcVigil_Load(object sender, EventArgs e) { dgvVigil.DataSource = LogDao.GetLogs(); cmbVigilInOut.DataSource = InOut; }
private void UcEmplo_Load(object sender, EventArgs e) { lblEmplo.Text += currentUser.name + ": "; dgvEmplo.DataSource = LogDao.GetUserLogs(currentUser); }