private void detach_DataImportTracking(DataImportTracking entity)
		{
			this.SendPropertyChanging();
			entity.Hotel = null;
		}
 partial void DeleteDataImportTracking(DataImportTracking instance);
 partial void UpdateDataImportTracking(DataImportTracking instance);
		private void attach_DataImportTracking(DataImportTracking entity)
		{
			this.SendPropertyChanging();
			entity.SysUser = this;
		}
 partial void InsertDataImportTracking(DataImportTracking instance);
 private void InsertTrackingRecord(int yearCode, int? monthCode, int hotelId, string importTableName, int importNumber, string fullPathName)
 {
   using (var context = Helper.GetDataContext())
   {
     var user = context.GetUser();
     var hotel = context.Hotel.First(h => h.HotelId == hotelId);
     var rd = new DataImportTracking()
     {
       YearCode = yearCode,
       MonthCode = monthCode,
       MonthDate = new DateTime(yearCode, 1, 1),
       InputTableName = importTableName,
       IsSuccess = (importNumber > 0),
       SuccessRecordNum = importNumber,
       FileName = new FileInfo(fullPathName).Name,
       OperatorTime = DateTime.Now,
       Hotel = hotel,
       SysUser = user
     };
     context.DataImportTracking.InsertOnSubmit(rd);
     context.SubmitChanges();
   }
   UpdateEmailNoticeStatus(yearCode, monthCode, hotelId);
 }