aboutsummaryrefslogtreecommitdiffstats
path: root/Software/Visual_Studio/PPC/Tango.PPC.Shared/SQL/ExecuteSqlResponse.cs
blob: 2db90a33604e7388607402919bcf651d23ffcdcb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Tango.PPC.Shared.SQL
{
    public class ExecuteSqlResponse
    {
        public int AffectedRecords { get; set; }
        public RemoteSqlDataSet DataSet { get; set; }

        public ExecuteSqlResponse()
        {
            DataSet = new RemoteSqlDataSet();
        }
    }
}
/span> { /// <summary> /// Converts user role to string. /// </summary> /// <seealso cref="System.Windows.Data.IValueConverter" /> public class UsersRolesToStringConverter : IValueConverter { public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { if (value == null) return ""; if (value is IEnumerable<UsersRole>) { IEnumerable<UsersRole> userRoles = value as IEnumerable<UsersRole>; return String.Join(", ", userRoles.Select(x => x.Role.Name)); } else { IEnumerable<MultiComboVM<Role>> userRoles = value as IEnumerable<MultiComboVM<Role>>; return String.Join(", ", userRoles.Where(x => x.IsSelected).Select(x => x.Entity.Name)); } } public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture) { throw new NotImplementedException(); } } }