private void cb_nhanvienpb_SelectedIndexChanged(object sender, EventArgs e) { ComboBox combo = sender as ComboBox; phongban = combo.SelectedItem.ToString(); lb_thongtin.Text = "Nhân viên phòng " + phongban; nd_soluong.Value = DataNhanSu.tinhluong("select dbo.soluongNVPB(N'" + phongban + "')"); dataGridView1.DataSource = DataNhanSu.Danhsach("select *from dbo.Nhanvienphongban(N'" + phongban + "')").Tables[0]; }
private void cb_nhanvienpb_SelectedIndexChanged(object sender, EventArgs e) { ComboBox combo = sender as ComboBox; phongban = combo.SelectedItem.ToString(); lb_thongtin.Text = "Nhân viên phòng " + phongban; nd_soluong.Value = DataNhanSu.tinhluong("select dbo.AmountEmpOffice(N'" + phongban + "')"); dataGridView1.DataSource = DataNhanSu.Danhsach("select nv.HoTen N'Họ và tên',nv.Ngaysinh N'Ngày sinh',nv.GioiTinh N'Giới tính',pb.TenPB N'Phòng Ban',cv.TenCV N'Chức vụ',td.TenTDHV N'Trình độ học vấn',td.ChuyenNganh N'Chuyên ngành',nv.DanToc N'Dân tộc',nv.QueQuan N'Quê quán' from dbo.NhanVien nv,dbo.ChucVu cv, dbo.TrinhDoHV td, dbo.PhongBan pb where nv.MaCV = cv.MaCV and nv.MaTD = td.MaTD and nv.MaPB = pb.MaPB and nv.isdelete=1 and pb.TenPB=N'" + phongban + "'").Tables[0]; }
public QuanliNhanvien() { InitializeComponent(); dataGridView1.DataSource = DataNhanSu.Danhsach(query_allnhanvien).Tables[0]; load(); loadCV(); loadluong(); loadtenv(); nd_soluong.Value = DataNhanSu.tinhluong("select dbo.soluongNV()"); }
private void cb_tháng_SelectedIndexChanged(object sender, EventArgs e) { ComboBox combo = sender as ComboBox; if (DataNhanSu.kiemtra("select dbo._kiemtraTenpb(N'" + combo.SelectedItem.ToString() + "')") == true) { tb_tongthuong.Text = (DataNhanSu.tinhluong("select dbo._tongluong(N'" + combo.SelectedItem.ToString() + "')")).ToString(); } else { tb_tongthuong.Text = "0"; } }
private void cb_tháng_SelectedIndexChanged(object sender, EventArgs e) { try { ComboBox combo = sender as ComboBox; if (DataNhanSu.kiemtra("select dbo.testNameOffice(N'" + combo.SelectedItem.ToString() + "')") == true) { tb_tongthuong.Text = (DataNhanSu.tinhluong("select dbo.TotalsalaryOffice(N'" + combo.SelectedItem.ToString() + "')")).ToString(); } } catch (Exception ex) { tb_tongthuong.Text = "0"; } }
private void bt_reset_Click(object sender, EventArgs e) { nd_soluong.Value = DataNhanSu.tinhluong("select dbo.soluongNV()"); dataGridView1.DataSource = DataNhanSu.Danhsach(query_allnhanvien).Tables[0]; }