public int XoaHocKy(string msHocKy) { HocKyModel hk = new HocKyModel(); hk.MSHOCKY = int.Parse(msHocKy); return(hk.Xoa()); }
// GET: Admin/LopHocPhan public ActionResult Index() { ViewData["DSBacDaoTao"] = new BacDaoTaoModel().DanhSach(); ViewData["DSKhoaHoc"] = new KhoaHocModel().DanhSach(); HocKyModel m = new HocKyModel(); return(View()); }
public string HocKyTheoKhoaHocJSON(string msNamHoc, string msKhoaHoc) { HocKyModel hk = new HocKyModel(); hk.MSKHOAHOC = int.Parse(msKhoaHoc); hk.MSNAMHOC = int.Parse(msNamHoc); return(JsonConvert.SerializeObject( hk.HocKyTheoKhoaHoc(), new IsoDateTimeConverter() { DateTimeFormat = "dd/MM/yyyy" } )); }
public int ThemHocKy(string mSNamHoc, string mSKhoaHoc, string tenHocKy, string ngayBatDau, string ngayKetThuc, string ngayDuTru, string ngaytKetThucDuTru) { HocKyModel hk = new HocKyModel(); hk.MSNAMHOC = int.Parse(mSNamHoc); hk.MSKHOAHOC = int.Parse(mSKhoaHoc); hk.TENHOCKY = tenHocKy; hk.NGAYBATDAU = DateTime.ParseExact(ngayBatDau, "yyyy-MM-dd", null); hk.NGAYKETTHUC = DateTime.ParseExact(ngayKetThuc, "yyyy-MM-dd", null); hk.THOIGIANBATDAUDUTRU = DateTime.ParseExact(ngayDuTru, "yyyy-MM-dd", null); hk.THOIGIANKETTHUCDUTRU = DateTime.ParseExact(ngaytKetThucDuTru, "yyyy-MM-dd", null); return(hk.Them()); }