/// <summary>
 /// Save and Update Booking Details
 /// </summary>
 /// <param name="bookingDetails"></param>
 /// <returns></returns>
 public int SaveAndUpdateBookingDetail(BookingDTO bookingDetails)
 {
     booking bookingEntity = new booking();
     AutoMapper.Mapper.Map(bookingDetails, bookingEntity);
     if (bookingDetails.Booking_Id == 0)
     {
         ESalesUnityContainer.Container.Resolve<IGenericRepository<booking>>().Save(bookingEntity);
     }
     else
     {
         ESalesUnityContainer.Container.Resolve<IGenericRepository<booking>>().Update(bookingEntity);
     }
     return bookingEntity.Booking_Id;
 }
     private void Fixupbooking(booking previousValue)
     {
         if (previousValue != null && previousValue.settlementofaccounts.Contains(this))
         {
             previousValue.settlementofaccounts.Remove(this);
         }
 
         if (booking != null)
         {
             if (!booking.settlementofaccounts.Contains(this))
             {
                 booking.settlementofaccounts.Add(this);
             }
             if (Account_Booking_Id != booking.Booking_Id)
             {
                 Account_Booking_Id = booking.Booking_Id;
             }
         }
     }
     private void Fixupbooking(booking previousValue)
     {
         if (previousValue != null && previousValue.smsregistrations.Contains(this))
         {
             previousValue.smsregistrations.Remove(this);
         }
 
         if (booking != null)
         {
             if (!booking.smsregistrations.Contains(this))
             {
                 booking.smsregistrations.Add(this);
             }
             if (SMSReg_Booking_Id != booking.Booking_Id)
             {
                 SMSReg_Booking_Id = booking.Booking_Id;
             }
         }
         else if (!_settingFK)
         {
             SMSReg_Booking_Id = null;
         }
     }
     private void Fixupbooking(booking previousValue)
     {
         if (previousValue != null && previousValue.moneyreceipts.Contains(this))
         {
             previousValue.moneyreceipts.Remove(this);
         }
 
         if (booking != null)
         {
             if (!booking.moneyreceipts.Contains(this))
             {
                 booking.moneyreceipts.Add(this);
             }
             if (MoneyReceipt_Booking_Id != booking.Booking_Id)
             {
                 MoneyReceipt_Booking_Id = booking.Booking_Id;
             }
         }
     }