public static BO.HostingUnitBO ConverFrom_DO_To_BoHostingUnit(DO.HostingUnit other)
 {
     BO.HostingUnitBO tmp = new BO.HostingUnitBO();
     tmp.Key             = other.Key;
     tmp.HostingUnitName = other.HostingUnitName;
     tmp.numOfOffers     = other.NumOfoffers;
     tmp.Owner           = other.Owner;
     tmp.PricePerNight   = other.pricePerNight;
     tmp.Status          = (BO.StatusActive)other.status;
     return(tmp);
 }
Example #2
0
 public static DO.HostingUnit Conv_BO_To_DO(BO.HostingUnit item)
 {
     DO.HostingUnit temp = new DO.HostingUnit();
     temp.Key             = item.Key;
     temp.HostingUnitName = item.HostingUnitName;
     temp.NumOfOffers     = item.NumOfOffers;
     temp.HostId          = item.HostId;
     temp.pricePerNight   = item.PricePerNight;
     temp.Status          = (DO.ActivityStatus)item.Status;
     temp.Diary           = item.Diary;/////////////////////////////////////////////////////////////////////////////////////////////
     return(temp);
 }
 public HostingUnit GetHoustingUinit(int key)
 {
     try
     {
         DO.HostingUnit tmp = dal.GetHostingUnit(key);
         return(Converters.Conv_DO_To_BO(tmp));
     }
     catch (Exception e)
     {
         throw e;
     }
 }
 public static DO.HostingUnit Conv_BO_To_DO(BO.HostingUnit item)
 {
     DO.HostingUnit temp = new DO.HostingUnit();
     temp.Key             = item.Key;
     temp.HostingUnitName = item.HostingUnitName;
     temp.NumOfOffers     = item.NumOfOffers;
     temp.HostId          = item.HostId;
     temp.pricePerNight   = item.PricePerNight;
     temp.Status          = (DO.ActivityStatus)item.Status;
     temp.Diary           = item.Diary;
     temp.Area            = (DO.Areas)item.Area;
     temp.Garden          = item.Garden;
     temp.Jacuzzi         = item.Jacuzzi;
     temp.Pool            = item.Pool;
     temp.Rooms           = item.Rooms;
     temp.Type            = (DO.HostingType)item.Type;
     return(temp);
 }
        public static HostingUnitXml conv_DO_To_Xml(DO.HostingUnit item)
        {
            HostingUnitXml temp = new HostingUnitXml();

            temp.Area = (Dal.Areas)item.Area;
            temp.ChildrensAttractions = item.ChildrensAttractions;
            temp.Diary           = item.Diary;
            temp.Garden          = item.Garden;
            temp.HostId          = item.HostId;
            temp.HostingUnitName = item.HostingUnitName;
            temp.Jacuzzi         = item.Jacuzzi;
            temp.Key             = item.Key;
            temp.NumOfOffers     = item.NumOfOffers;
            temp.Pool            = item.Pool;
            temp.pricePerNight   = item.pricePerNight;
            temp.Rooms           = item.Rooms;
            temp.Status          = (Dal.ActivityStatus)item.Status;
            temp.Type            = (Dal.HostingType)item.Type;
            return(temp);
        }
Example #6
0
 public static BO.HostingUnit CastingToBOHostingUnit(DO.HostingUnit hostingUnit)
 {
     BO.HostingUnit HU = new BO.HostingUnit()
     {
         Diary           = hostingUnit.Diary,
         HostingUnitName = hostingUnit.HostingUnitName,
         Key             = hostingUnit.Key,
         Owner           = hostingUnit.Owner,
         Status          = (BO.Status)hostingUnit.Status,
         Area            = (BO.Location)hostingUnit.Area,
         ImageLink1      = hostingUnit.ImageLink1,
         ImageLink2      = hostingUnit.ImageLink2,
         ImageLink3      = hostingUnit.ImageLink3,
         Jacuzzi         = hostingUnit.Jacuzzi,
         Kitchen         = hostingUnit.Kitchen,
         SwimmingPool    = hostingUnit.SwimmingPool,
         TV            = hostingUnit.TV,
         WIFI          = hostingUnit.WIFI,
         PricePerNight = hostingUnit.PricePerNight
     };
     return(HU);
 }
Example #7
0
 //static public bool GetDate(this DO.HostingUnit hostingUnit, DateTime dateTime)
 //{
 //    return hostingUnit.Diary[dateTime.Month - 1, dateTime.Day - 1];
 //}
 static public void SetDate(this DO.HostingUnit hostingUnit, DateTime dateTime, bool value)
 {
     hostingUnit.Diary[dateTime.Month - 1, dateTime.Day - 1] = value;
 }