コード例 #1
0
        public Drug Edit(Drug obj)
        {
            List <Drug> drugs = _stream.ReadAll().ToList();

            drugs[drugs.FindIndex(dr => dr.Id == obj.Id)] = obj;
            _stream.SaveAll(drugs);
            return(obj);
        }
コード例 #2
0
        public Equipment GetEquip(Equipment equipment)
        {
            List <Equipment> equipments = _stream.ReadAll().ToList();

            return(equipments[equipments.FindIndex(apt => apt.Name.Equals(equipment.Name))]);
        }