Пример #1
0
        public string GetStateDesc(Func <OrderStateValue, bool> filter)
        {
            var result = string.Join(", ",
                                     OrderStateValues.Where(filter).OrderBy(x => x.OrderKey).Where(x => !string.IsNullOrEmpty(x.State)).Select(
                                         x =>
                                         string.Format("{0}{1}", x.State.Trim(),
                                                       !string.IsNullOrEmpty(x.StateValue)
                                                 ? string.Format(":{0}", x.StateValue.Trim())
                                                 : "").Trim()));

            return(result);
        }
Пример #2
0
 public string GetStateData()
 {
     return(string.Join("\r", OrderStateValues.Where(x => !string.IsNullOrEmpty(x.State)).OrderBy(x => x.OrderKey).Select(x => string.Format("{0} {1}", x.State, !string.IsNullOrEmpty(x.StateValue) ? string.Format("[{0}]", x.StateValue) : ""))));
 }