コード例 #1
0
        public bool themChiTietPhong(CHITIETPHONG chiTietPhong)
        {
            try
            {
                ketNoi.CHITIETPHONGs.InsertOnSubmit(chiTietPhong);
                ketNoi.SubmitChanges();
                return(true);
            }
            catch (Exception)
            {
                return(false);

                throw;
            }
        }
コード例 #2
0
 public bool capNhatChiTietPhong(CHITIETPHONG chiTietPhong)
 {
     try
     {
         var ketQua = from chiTietPhongTam in ketNoi.CHITIETPHONGs
                      where chiTietPhongTam.MAPHONG == chiTietPhong.MAPHONG
                      select chiTietPhongTam;
         foreach (var tam in ketQua)
         {
             tam.GIOITINH        = chiTietPhong.GIOITINH;
             tam.DIACHITHUONGTRU = chiTietPhong.DIACHITHUONGTRU;
             tam.NGAYSINH        = chiTietPhong.NGAYSINH;
             tam.SOCMND          = chiTietPhong.SOCMND;
             tam.SODIENTHOAI     = chiTietPhong.SODIENTHOAI;
             tam.TENKHACH        = chiTietPhong.TENKHACH;
         }
         ketNoi.SubmitChanges();
         return(true);
     }
     catch (Exception)
     {
         return(false);
     }
 }
コード例 #3
0
 partial void UpdateCHITIETPHONG(CHITIETPHONG instance);
コード例 #4
0
 partial void DeleteCHITIETPHONG(CHITIETPHONG instance);
コード例 #5
0
 partial void InsertCHITIETPHONG(CHITIETPHONG instance);