Esempio n. 1
0
 public static string ToString(CarePlanStatus value)
 {
     if (value == CarePlanStatus.Planned)
     {
         return("planned");
     }
     else if (value == CarePlanStatus.Active)
     {
         return("active");
     }
     else if (value == CarePlanStatus.Ended)
     {
         return("ended");
     }
     else
     {
         throw new ArgumentException("Unrecognized CarePlanStatus value: " + value.ToString());
     }
 }
Esempio n. 2
0
            public static bool TryParse(string value, out CarePlanStatus result)
            {
                result = default(CarePlanStatus);

                if (value == "planned")
                {
                    result = CarePlanStatus.Planned;
                }
                else if (value == "active")
                {
                    result = CarePlanStatus.Active;
                }
                else if (value == "ended")
                {
                    result = CarePlanStatus.Ended;
                }
                else
                {
                    return(false);
                }

                return(true);
            }