private void btn_xem2_Click(object sender, EventArgs e) { Object_Lop l = new Object_Lop(); l.MaLop = txt_malop.Text; dgr_bangdiem.DataSource = Bus.ThongKeDiem_MaLop(l); }
public static DataTable GetTenLop_MaLop(Object_Lop l) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@malop", l.MaLop) }; return(DataProvider.GetDatadk("GetTenLop_malop", para)); }
//Thống kê theo lớp public static DataTable ThongKeDiem_MaLop(Object_Lop l) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@malop", l.MaLop) }; return(DataProvider.GetDatadk("ThongKeDiem_lop", para)); }
//XÓA LỚP public static int XoaLop(Object_Lop lop) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@malop", lop.MaLop) }; return(DataProvider.ExecuteNonQuery("Xoalop", para)); }
//SỬA LỚP public static int SuaLop(Object_Lop lop) { SqlParameter[] para = new SqlParameter[] { new SqlParameter("@malop", lop.MaLop), new SqlParameter("@tenlop", lop.TenLop), new SqlParameter("@soluongsv", lop.SoLuongSV), new SqlParameter("@magv", lop.MaGV) }; return(DataProvider.ExecuteNonQuery("sualop", para)); }
private void btn_in2_Click(object sender, EventArgs e) { try { Object_Lop l = new Object_Lop(); l.MaLop = txt_malop2.Text; DataTable dt = Bus.GetTenLop_MaLop(l); label6.ResetText(); label7.ResetText(); label8.ResetText(); label9.ResetText(); label10.ResetText(); label11.ResetText(); label7.Text = "Lớp "; label8.Text = DateTime.Now.ToShortDateString(); label6.Text = "Lớp: " + dt.Rows[0].Field <string>("tenlop"); dgr_thongkediem.DataSource = Bus.ThongKeDiem_MaLop(l); Export ex = new Export(); ex.ExportExcel_MaLop(Bus.ThongKeDiem_MaLop(l), "lớp " + txt_malop2.Text + " - " + dt.Rows[0].Field <string>("tenlop"), "Kết quả học tập " + label6.Text); } catch (Exception ex) { MessageBox.Show("Lỗi biên dịch \nKiểm tra dữ liệu nhập "); } }
public static int XoaLop(Object_Lop lop) { return(Dao.XoaLop(lop)); }
public static int SuaLop(Object_Lop lop) { return(Dao.SuaLop(lop)); }
public static int Themlop(Object_Lop lop) { return(Dao.ThemLop(lop)); }
public static DataTable GetTenLop_MaLop(Object_Lop l) { return(Dao.GetTenLop_MaLop(l)); }
// thống kê theo mã lớp public static DataTable ThongKeDiem_MaLop(Object_Lop l) { return(Dao.ThongKeDiem_MaLop(l)); }