added business layer logic

This commit is contained in:
2022-06-29 13:03:33 -04:00
parent bd53cb400b
commit a9a3c06528
3 changed files with 208 additions and 3 deletions

View File

@@ -1,6 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using DeskHubSharpRevised.Models;
namespace DeskHubSharpRevised.BLL;
public class RepoInfo
class RepoInfo
{
public RepoInfo()
{
}
/// <summary>
/// Return a list for the list box
/// </summary>
/// <returns></returns>
public List<string> GetRepoInfoList()
{
List<string> stuff = new List<string>();
try
{
stuff = RequestList.repoDetail.Select(x => x.full_name).ToList();
}
catch (Exception)
{
ErrorWindow err = new ErrorWindow();
err.txtblk_error.Text = "We couldn't gather any data. Does the user exist?";
err.btn_error_close.Content = "FUCK!";
err.lbl_title.Content = "Oops!";
err.Show();
}
return stuff;
}
/// <summary>
/// Return a list for the combo box
/// </summary>
/// <returns></returns>
public List<string> GetBranchNameComboBox()
{
List<string> stuff = RequestList.branchDetail.Select(x => x.name).ToList();
return stuff;
}
}