private void btnAddSche_Click(object sender, EventArgs e) { resetText(); enableText(); txtScheduleId.Text = CodeAutomaticID.NextID(scheduleBus.getLastIdBus(), "L"); TEMP = 1; }
private void btnThem_Click(object sender, EventArgs e) { txtMaKhoa.Enabled = false; txtMaKhoa.Text = CodeAutomaticID.NextID(controllerKhoa.get(), "K"); // Khoa btnThem.Enabled = false; }
private void btnThem_Click(object sender, EventArgs e) { txtMaCanBo.Enabled = false; cboLTaiKhoan.Enabled = true; txtMaCanBo.Text = CodeAutomaticID.NextID(controllerCB.get(), "CB"); cboLTaiKhoan.DataSource = controllerCB.LoaiTaiKhoan(); cboLTaiKhoan.DisplayMember = "TenLoai"; cboLTaiKhoan.ValueMember = "MaLoai"; }
private void btnThem_Click(object sender, EventArgs e) { txtMaBoMon.Enabled = false; txtMaBoMon.Text = CodeAutomaticID.NextID(controllerBM.get(), "BM"); // Hiển thị cán bộ thuộc bộ môn cboTruongBoMon.DataSource = controllerBM.GetCanBo(); cboTruongBoMon.DisplayMember = "TenCanBo"; cboTruongBoMon.ValueMember = "MaCanBo"; }
private void btnSelectStaff_Click(object sender, EventArgs e) { string notiId = CodeAutomaticID.NextID(scheduleBus.getLastIdNotiBus(), "TB"); scheduleBus.InsertNotification(notiId, schedule.ID, DateTime.Now, DateTime.Now.AddHours(3), 2); for (int i = 0; i < dgvSelectStaff.SelectedRows.Count; i++) { string staffSelectId = dgvSelectStaff.SelectedRows[i].Cells["MaCanBo"].Value.ToString(); scheduleBus.SendNotifcation(notiId, staffSelectId); } if (statusButton == 1) { MessageBox.Show("Tạo lịch công việc thành công", "Thông báo"); } else if (statusButton == 2) { MessageBox.Show("Thay đổi thành công", "Thông báo"); } this.Close(); }