public static void XoaTre(List <string> listMaTre) { foreach (string maTre in listMaTre) { TreDAL.XoaTre(maTre); } }
public static bool KiemTraTreThoiHoc(string maTre, string maLop) { if (string.Compare(TreDAL.GetTinhTrangTrongLop(maTre, maLop).Trim(), "2") == 0) { return(true); } return(false); }
public static string GetHoTen(string maTre) { DataTable dt = TreDAL.GetHoTenTre(maTre); foreach (DataRow row in dt.Rows) { return(row["HoTenTre"].ToString()); } return(""); }
public static bool CapNhatThongTinTre(Tre tre) { try { TreDAL.CapNhatThongTinTre(tre); } catch (Exception ex) { return(false); } return(true); }
public static void ThemLopThamGia(string maDV, string maLop) { DichVuSucKhoeDAL.ThemLopThamGia(maDV, maLop); //Them ket qua suc khoe mac dinh cho lop nay DataTable listTre = TreDAL.GetListTreTheoLop(maLop); foreach (DataRow row in listTre.Rows) { DichVuSucKhoeDAL.ThemThongTinSucKhoe(maDV, row["MaTre"].ToString()); } }
public static void ThemLopThamGia(string maHD, string maLop) { HoatDongNgoaiKhoaDAL.ThemLopThamGia(maHD, maLop); //Them ket qua hoat dong mac dinh cho lop nay DataTable listTre = TreDAL.GetListTreTheoLop(maLop); foreach (DataRow row in listTre.Rows) { HoatDongNgoaiKhoaDAL.ThemKetQuaHoatDong(maHD, row["MaTre"].ToString()); } }
public static void XoaLopThamGia(string maHD, string maLop) { //Xoa ket qua mac dinh da tao cho lop nay DataTable listTre = TreDAL.GetListTreTheoLop(maLop); foreach (DataRow row in listTre.Rows) { HoatDongNgoaiKhoaDAL.XoaKetQuaHoatDong(maHD, row["MaTre"].ToString()); } //Tien hanh xoa lop nay trong danh sach lop tham gia HoatDongNgoaiKhoaDAL.XoaLopThamGia(maHD, maLop); }
public static void XoaLopThamGia(string maDV, string maLop) { //Xoa ket qua mac dinh da tao cho lop nay DataTable listTre = TreDAL.GetListTreTheoLop(maLop); foreach (DataRow row in listTre.Rows) { DichVuSucKhoeDAL.XoaThongTinSucKhoe(maDV, row["MaTre"].ToString()); } //Tien hanh xoa lop nay trong danh sach lop tham gia DichVuSucKhoeDAL.XoaLopThamGia(maDV, maLop); }
public static string AutoMaLop() { string id = TreDAL.GetLastID().Trim(); if (id == "") { return("MLOP000001"); } int nextID = int.Parse(id.Remove(0, "MLOP".Length)) + 1; id = "00000" + nextID.ToString(); id = id.Substring(id.Length - 6, 6); return("MLOP" + id); }
public static bool ThemTre(Tre hocsinhmoi) { DataTable dt = TreDAL.ThemTre(hocsinhmoi); foreach (DataRow row in dt.Rows) { if (row.ItemArray[0].ToString().Trim() == "0") { return(true); } } return(false); }
public static bool XepLop(List <string> listMaTre, string maLop) { foreach (string maTre in listMaTre) { try { TreDAL.XepLop(maTre, maLop); } catch (Exception ex) { return(false); } } return(true); }
public static int GetSoNgayDiHocTrongThang(string maTre, int thang, int nam) { DataTable dt = TreDAL.LayTongSoNgayDiHocTrongThang(maTre, thang, nam); try { foreach (DataRow row in dt.Rows) { return(int.Parse(row["SoNgayDiHoc"].ToString())); } } catch (Exception) { MessageBox.Show("Đã xảy ra lỗi khi lấy tổng số ngày đi học trong tháng."); } return(0); }
public static bool ChuyenLop(string maTre, string maLopMoi, string maLopCu) { if (string.Compare(TreDAL.GetTinhTrangTrongLop(maTre, maLopCu).Trim(), "0") == 0) { try { TreDAL.ChuyenLop(maTre, maLopMoi); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { return(false); } return(true); }
public static bool ThoiHoc(List <string> listMaTre, string maLop) { foreach (string maTre in listMaTre) { if (string.Compare(TreDAL.GetTinhTrangTrongLop(maTre, maLop).Trim(), "0") == 0) { try { TreDAL.ThoiHoc(maTre, maLop); } catch (Exception ex) { MessageBox.Show(ex.Message); } } else { return(false); } } return(true); }
public static DataTable GetSucKhoeTheoThang(string maTre, int thang, int nam) { return(TreDAL.GetSucKhoeTheoThang(maTre, thang, nam)); }
public static void ThemTreVaoLop(string maTre, string maLop) { TreDAL.ThemTreVaoLop(maTre, maLop); }
public static DataTable TreChuaCoLop(string namSinh) { return(TreDAL.TreChuaCoLop(namSinh)); }
public static DataTable GetListTreTheoMaLop(string maLop) { return(TreDAL.GetListTreTheoMaLop(maLop)); }
public static DataTable GetListTre(Lop lop = null, string keyWord = null, string gioiTinh = null) { return(TreDAL.GetListTre(lop, keyWord, gioiTinh)); }
public static void XoaTre(string maTre) { TreDAL.XoaTre(maTre); }
public static DataTable TimKiemTre(string tuKhoa) { return(TreDAL.TimKiemTre(tuKhoa)); }
public static DataTable LayThongTinTre(string maTre) { return(TreDAL.LayThongTinTre(maTre)); }
public static void CapNhatThongTinTre(Tre tre) { TreDAL.CapNhatThongTinTre(tre); }
public static DataTable GetSucKhoe(string maTre, int nam) { return(TreDAL.GetSucKhoe(maTre, nam)); }
public static List <Tre> GetList() { return(TreDAL.GetList()); }
public static DataTable GetListTreChuaCoLop(int tuoiMin, int tuoiMax) { return(TreDAL.GetListTreChuaCoLop(tuoiMin, tuoiMax)); }
public static Tre GetTre(string maTre) { return(TreDAL.GetTre(maTre)); }
public static DataTable GetLopDaHoc(string maTre) { return(TreDAL.GetLopDaHoc(maTre)); }