public OfferModel() { List <KeyValuePair <int, string> > objStatustypes = new List <KeyValuePair <int, string> >(); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.StatusType.Active, CLayer.ObjectStatus.StatusType.Active.ToString())); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.StatusType.Blocked, CLayer.ObjectStatus.StatusType.Blocked.ToString())); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.StatusType.Deleted, CLayer.ObjectStatus.StatusType.Deleted.ToString())); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.StatusType.NotVerified, "Recent")); StatusOfferTypes = new SelectList(objStatustypes, "Key", "Value"); List <KeyValuePair <int, string> > objOffertypes = new List <KeyValuePair <int, string> >(); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.OfferRateType.OfferPercentageRate, CLayer.ObjectStatus.OfferRateType.OfferPercentageRate.ToString())); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.OfferRateType.OfferFlatRate, CLayer.ObjectStatus.OfferRateType.OfferFlatRate.ToString())); objStatustypes.Add(new KeyValuePair <int, string>((int)CLayer.ObjectStatus.OfferRateType.OfferFreeRate, CLayer.ObjectStatus.OfferRateType.OfferFreeRate.ToString())); OfferTypeLi = new SelectList(objOffertypes, "Key", "Value"); offerlist = new List <CLayer.Offers>(); Array OfferListarry = Enum.GetValues(typeof(OfferForEn)); List <SelectListItem> Items = new List <SelectListItem>(OfferListarry.Length); foreach (var i in OfferListarry) { Items.Add(new SelectListItem { Text = Enum.GetName(typeof(OfferForEn), i), Value = ((int)i).ToString() }); } OfferForList = new SelectList(Items, "Value", "Text"); Accommodations = new List <CLayer.Accommodation>(); Accommodation = new AccommodationModel(); //Model StartDate = DateTime.Now.Date; EndDate = DateTime.Now.AddDays(1); //DateTime.Now.Date; RateType = (int)CLayer.ObjectStatus.OfferRateType.OfferPercentageRate; OfferType = (int)StayBazar.Areas.Admin.Models.OfferModel.OfferOn.Accommodation; }
public TaxModel() { StartDate = DateTime.Today.ToShortDateString(); EndDate = DateTime.Today.AddDays(1).ToShortDateString(); List <CLayer.Country> countries = BLayer.Country.GetAll(); countries.Insert(0, new CLayer.Country() { CountryId = 0, Name = "Select" }); CountryList = new SelectList(countries, "CountryId", "Name"); if (countries.Count > 0) { List <CLayer.State> states = BLayer.State.GetOnCountry((int)countries[0].CountryId); states.Insert(0, new CLayer.State() { StateId = 0, Name = "Select" }); StateList = new SelectList(states, "StateId", "Name"); List <CLayer.City> cities = null; if (states.Count > 0) { cities = BLayer.City.GetOnState((int)states[0].StateId); } cities.Insert(0, new CLayer.City() { CityId = 0, Name = "Select" }); cities.Add(new CLayer.City() { CityId = -1, Name = "Other" }); CityList = new SelectList(cities, "CityId", "Name"); } List <CLayer.TaxTitle> taxtitle = BLayer.TaxTitle.GetAll(); TaxTitleList = new SelectList(taxtitle, "TaxTitleId", "Title"); Accommodations = new List <CLayer.Accommodation>(); Accommodation = new AccommodationModel();//Model }
public OffersaveModel() { Accommodations = new List <CLayer.Accommodation>(); Accommodation = new AccommodationModel();//Model }
public PropertyAccommmodationModel() { Accommodation = new AccommodationModel(); Accommodations = new List <CLayer.Accommodation>(); }