コード例 #1
0
 public bool Insert(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.Insert(hocSinh));
 }
コード例 #2
0
        public int Insert(HocSinh hs)
        {
            //if (checkmaHocSinh_ID(hs.Mahocsinh) == 0)
            //{

            hs.Tenhocsinh = Tools.ChuanHoaXau(hs.Tenhocsinh);
            hs.Quequan    = Tools.ChuanHoaXau(hs.Quequan);
            //hs.Gioitinh = Tools.ChuanHoaXau(hs.Gioitinh);
            return(dal.Insert(hs));
            //}
            //else return -1;
        }
コード例 #3
0
 public bool Insert(HocSinhDTO hs)
 {
     return(HS.Insert(hs));
 }