/// <summary Get Collection> /// Get collection of emails. If no records to return, EmailCollection will be null. /// </summary> /// <returns></returns> public static ProjectsCollection GetCollection() { ProjectsCollection tempList = null; using (SqlConnection myConnection = new SqlConnection(AppConfiguration.ConnectionString)) { using (SqlCommand myCommand = new SqlCommand("usp_GetProjects", myConnection)) { myCommand.CommandType = CommandType.StoredProcedure; myCommand.Parameters.AddWithValue("@QueryId", SelectTypeEnum.GetCollection); myConnection.Open(); using (SqlDataReader myReader = myCommand.ExecuteReader()) { if (myReader.HasRows) { tempList = new ProjectsCollection(); while (myReader.Read()) { tempList.Add(FillDataRecord(myReader)); } } myReader.Close(); } } } return tempList; }
public TeamCityServiceContext(Uri serviceUri, string username, string password) { _syncRoot = new object(); _serviceUri = serviceUri; _passphrase = GetPassphrase(username, password); _projects = new ProjectsCollection(this); _buildTypes = new BuildTypesCollection(this); _builds = new BuildsCollection(this); }
public RedmineServiceContext(Uri serviceUri, string apiKey) { _serviceUri = serviceUri; _apiKey = apiKey; _news = new NewsCollection(this); _projects = new ProjectsCollection(this); _issues = new IssuesCollection(this); _users = new UsersCollection(this); _userRoles = new UserRolesCollection(this); _relations = new IssueRelationsCollection(this); _trackers = new IssueTrackersCollection(this); _statuses = new IssueStatusesCollection(this); _priorities = new IssuePrioritiesCollection(this); _categories = new IssueCategoriesCollection(this); _versions = new ProjectVersionsCollection(this); _attachments = new AttachmentsCollection(this); _customFields = new CustomFieldsCollection(this); _queries = new QueriesCollection(this); _syncRoot = new object(); }
public void ChangeListSorting (ProjectsCollection.SortProjectsBy sortBy) { ProjectList.SortBy = sortBy; var settingsStore = ServiceContainer.Resolve<ISettingsStore> (); settingsStore.SortProjectsBy = sortBy.ToString (); }
public static ProjectsCollection GetAll() { resourceSchema.Dal.Projects dbo = null; try { dbo = new resourceSchema.Dal.Projects(); System.Data.DataSet ds = dbo.Projects_Select_All(); ProjectsCollection collection = new ProjectsCollection(); if (GlobalTools.IsSafeDataSet(ds)) { for (int i = 0; (i < ds.Tables[0].Rows.Count); i = (i + 1)) { Projects obj = new Projects(); obj.Fill(ds.Tables[0].Rows[i]); if ((obj != null)) { collection.Add(obj); } } } return collection; } catch (System.Exception ) { throw; } finally { if ((dbo != null)) { dbo.Dispose(); } } }
private void Clean() { this.Sysid = null; this.Publicid = null; this.Path = string.Empty; this.Createdate = null; this.Lastmodifieddate = null; this.Active = null; this._projectsCollection = null; }