public ActionResult AddNewLHS(LuuHocSinh luuhocsinh) { F_Luuhocsinh f_lhs = new F_Luuhocsinh(); f_lhs.AddNewLHS(luuhocsinh); return(RedirectToAction("/luuhs/addnewlhs")); }
public ActionResult DetailLHS(string MALHS) { LUUHS lhs = new LUUHS(); F_Luuhocsinh f_lhs = new F_Luuhocsinh(); var detaillhs = f_lhs.Detai_LHS_Ma(MALHS); ViewBag.Doituong = lhs.DoiTuongs.Where(x => x.MaDoiTuong != 0).ToList(); return(View(detaillhs)); }
// GET: LuuHS public ActionResult Index() { try { F_Luuhocsinh f_lhs = new F_Luuhocsinh(); ViewBag.alllhs = f_lhs.GetAll_LHS(); } catch (Exception) { throw; } return(View()); }
public string UploadAvatar(HttpPostedFileBase AvatarImg, string id) { try { string fileExtend = System.IO.Path.GetExtension(AvatarImg.FileName); string targetFolder = Server.MapPath("~/Content/img/img_lhs/"); string targetPath = Path.Combine(targetFolder, id + fileExtend); AvatarImg.SaveAs(targetPath); F_Luuhocsinh f_lhs = new F_Luuhocsinh(); f_lhs.ChangeImageLHS(id, "Content/img/img_lhs/" + id + fileExtend); return("Upload thành công"); } catch (Exception) { return("Upload không thành công"); } }
public ActionResult InitMap() { try { F_Luuhocsinh f_lhs = new F_Luuhocsinh(); var lhs_time = f_lhs.Thongke_LHS_time(2019); for (int i = 0; i < lhs_time.Count; i++) { lhs_time[i].madiaban = lhs_time[i].madiaban.Trim(); } ViewBag.lhs_time = lhs_time; } catch (Exception) { throw; } return(View()); }