Exemple #1
0
        public void modify(string i_Id, eStatus i_Status)
        {
            GarageItem item = getById(i_Id);

            if (item == null)
            {
                throw new ArgumentException("Entry was not found...");
            }
            else
            {
                item.Status = i_Status;
            }
        }
Exemple #2
0
        public bool add(string i_Id, string i_Type,
                        string i_Owner, string i_Phone,
                        Dictionary <string, string> i_Properties)
        {
            GarageItem item  = getById(i_Id);
            bool       exist = true;

            if (item == null)
            {
                // create a new entry
                _add(i_Id, i_Type, i_Owner, i_Phone, i_Properties);
                return(!exist);
            }
            else
            {
                // put in mainteinance

                item.Status = eStatus.maintenance;
                return(exist);
            }
        }