public PeraPortSapWsClient(IDataAccess dataAccess,INotification notification) { _dataAccess = dataAccess; _notification = notification; //ChildServiceParameters = new Dictionary<string, object>(); InitWebServiceClient(); DtoSet = new DtoSet(); }
private void InsertData(DtoSet dtoSet) { foreach (var propertyInfo in DtoSet.GetType().GetProperties(BindingFlags.Public | BindingFlags.DeclaredOnly | BindingFlags.Instance)) { if (propertyInfo.GetValue(dtoSet) == null) continue; if ((propertyInfo.GetValue(dtoSet) as IList).Count <= 1) continue; Console.WriteLine(propertyInfo.PropertyType.GenericTypeArguments[0]); var query = Helper.CreateInsertQuery(propertyInfo.PropertyType.GenericTypeArguments[0]); _dataAccess.ExecuteQuery(query, CommandType.Text, propertyInfo.GetValue(dtoSet)); } }