public OffersViewModel(account cont) { actions = new OfferActions(); _cont = cont; actions = new OfferActions(); if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }
public FormOfferViewModel(account cont) { _cont = cont; actions = new OfferActions(); StartDate = System.DateTime.Today; DueDate = System.DateTime.Today; Visible = "Hidden"; if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }
public FormOfferViewModel(offer offer, account cont) { _cont = cont; _offer = offer; OfferName = offer.offerName; Price = offer.newPrice.ToString(); NumberOfBookedRooms = offer.nrBookedRooms.ToString(); StartDate = DateTime.Parse(offer.startDate.ToString()); DueDate = DateTime.Parse(offer.dueDate.ToString()); actions = new OfferActions(); Visible = "Visible"; if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }