public int Update(HocSinh hs) { //if (checkmaHocSinh_ID(hs.Mahocsinh) != 0) //{ hs.Tenhocsinh = Tools.ChuanHoaXau(hs.Tenhocsinh); hs.Quequan = Tools.ChuanHoaXau(hs.Quequan); return(dal.Update(hs)); //} //else return -1; }
public bool Update(HocSinh hocSinh) { if (string.IsNullOrEmpty(hocSinh.MaHS) || string.IsNullOrEmpty(hocSinh.TenHS) || string.IsNullOrEmpty(hocSinh.DiaChi)) { return(false); } if (!hocSinhDAO.IsExisted(hocSinh.MaHS)) { return(false); } return(hocSinhDAO.Update(hocSinh)); }