public Reciept(Guest guest, DateTime from, DateTime to)
 {
     this.Guest = guest;
     Guest.Reciepts.Add(this);
     StayedToDate   = to;
     StayedFromDate = from;
     State          = new UnsettledReciept(this);
     Bills          = new ObservableCollection <Bill>();
 }
Example #2
0
        public static RecieptState GetRecieptState(string stateTypeName)
        {
            var     list          = FindAllDerivedStates(typeof(RecieptState));
            dynamic returnedValue = new UnsettledReciept();

            foreach (var state in list)
            {
                if (state.Name == stateTypeName)
                {
                    returnedValue = (RecieptState)Activator.CreateInstance(state);
                }
            }
            return(returnedValue);
        }