public string maLopTiepTheo() { Lop_DAO hvDAO = new Lop_DAO(); string MaLopLonNhat = hvDAO.LayMaLopLonNhat(); if (string.IsNullOrEmpty(MaLopLonNhat)) { return("LH01"); } else { int maso = int.Parse(MaLopLonNhat.Substring(2)); return("LH" + (maso + 1).ToString("00")); } }
public string soLopTiepTheo(string makh) { Lop_DAO hvDAO = new Lop_DAO(); string MaLopLonNhat = hvDAO.LaySoLopLonNhat(makh); if (string.IsNullOrEmpty(MaLopLonNhat)) { return("1"); } //cách khác: //var getNumbers = (from t in MaLopLonNhat // where char.IsDigit(t) // select t).ToArray(); //string strMaMax = new string(getNumbers); string strMaMax = Regex.Replace(MaLopLonNhat, @"\D", ""); int soMax = int.Parse(strMaMax); int maTiepTheo = soMax + 1; return(maTiepTheo.ToString()); }
public List <Lop_DTO> DanhSachLop2(string makhoa) { Lop_DAO lopDao = new Lop_DAO(); return(lopDao.loadDSLop2(makhoa)); }
public List <Lop_DTO> DanhSachLop() { Lop_DAO lopDAO = new Lop_DAO(); return(lopDAO.LoadDSLop()); }
public int DeleteLop(string malop) { Lop_DAO lopDAO = new Lop_DAO(); return(lopDAO.DeleteLopHoc(malop)); }
public int UpdateLop(Lop_DTO lopDTO) { Lop_DAO lopDAO = new Lop_DAO(); return(lopDAO.UpdateLopHoc(lopDTO)); }
//danh sách sv trong 1 lớp, phiếu điểm public static DataTable phieuDiemLop_namHoc(string maLop, int namHoc) { return(Lop_DAO.phieuDiemLop_namHoc(maLop, namHoc)); }
public static string maLop(string tenLop) { return(Lop_DAO.maLop(tenLop)); }
//xóa lớp public static void xoaLop(string maLop) { Lop_DAO.xoaLop(maLop); }
//sửa lớp public static void suaLop(string maLop, string tenLop, string tenKhoa) { Lop_DAO.suaLop(maLop, tenLop, tenKhoa); }
//thêm lớp public static void themLop(string maLop, string tenLop, string tenKhoa) { Lop_DAO.themLop(maLop, tenLop, tenKhoa); }
public static DataTable DSLop() { return(Lop_DAO.DSLop()); }
public static DataTable phieuDiem_Lop(string tenlop, int kyHoc, int namHoc) { return(Lop_DAO.PhieuDiem_Lop(tenlop, kyHoc, namHoc)); }
public static DataTable DSSV_Lop(string tenLop) { return(Lop_DAO.DSSV_Lop(tenLop)); }
public static string lastMaLop() { return(Lop_DAO.LastMaLop()); }
public int AddLop(Lop_DTO lopDTO) { Lop_DAO lopDAO = new Lop_DAO(); return(lopDAO.AddLopHoc(lopDTO)); }
public static DataTable LoadtenLop() { return(Lop_DAO.tenLop()); }