Ejemplo n.º 1
0
        private void FormModifyIssue_Load(object sender, EventArgs e)
        {
            dateTimediscovery.MaxDate = DateTime.Now;
            //populates the options for the drop downs
            foreach (AppUser appUser in userRepository.GetAll())
            {
                comboBoxdiscoverer.Items.Add(appUser.LastName + ", " + appUser.FirstName);
            }

            foreach (IssueStatus issueStatus in issueStatusRepository.GetAll())
            {
                comboBoxstatus.Items.Add(issueStatus.Value);
            }

            //set initial values from selected issue
            Issue issue = issueRepository.GetIssueById(_SelectedIssueId);

            textBoxid.Text                  = Convert.ToString(issue.Id);
            textBoxtitle.Text               = Convert.ToString(issue.Title);
            dateTimediscovery.Value         = issue.DiscoveryDate;
            dateTimediscovery.CustomFormat  = "hh:mm:ss tt dd MMM yyyy";
            comboBoxdiscoverer.SelectedItem = issue.Discoverer;
            textBoxcomponent.Text           = issue.Component;
            comboBoxstatus.Text             = issueStatusRepository.GetValueById(issue.IssueStatusId);
            textBoxdescription.Text         = issue.InitialDescription;

            this.CenterToScreen();
        }
Ejemplo n.º 2
0
        private void FormRecordIssue_Load(object sender, EventArgs e)
        {
            this.CenterToParent();
            int    nextID;
            string disc;
            string IsStat;
            FakeIssueRepository       IssueRepo     = new FakeIssueRepository();
            FakeAppUserRepository     AppRepo       = new FakeAppUserRepository();
            FakeIssueStatusRepository IssueStatRepo = new FakeIssueStatusRepository();
            List <AppUser>            userList      = new List <AppUser>();
            List <IssueStatus>        issueStatList = new List <IssueStatus>();

            nextID = IssueRepo.GetNextIssueID(ID);
            textBoxIssueID.Text = nextID.ToString();
            userList            = AppRepo.GetAll();
            foreach (AppUser user in userList)
            {
                disc = (user.LastName + ", " + user.FirstName);
                comboBoxDiscoverer.Items.Add(disc);
            }
            issueStatList = IssueStatRepo.GetAll();
            foreach (IssueStatus stat in issueStatList)
            {
                IsStat = stat.Value;
                comboBoxIssueStatus.Items.Add(IsStat);
            }
        }
Ejemplo n.º 3
0
        private void FormRecord_Load(object sender, EventArgs e)
        {
            this.CenterToParent();


            //create and add a new issue
            Issue tmp = new Issue();

            IssueRepository.Add(tmp);

            //get the index from newly implemented issue then remove it
            _i = tmp.Id;
            IssueRepository.Remove(tmp);


            IdBox.Text = (_i.ToString());

            foreach (AppUser user in _userRepository.GetAll())
            {
                comboBox1.Items.Add(user.LastName + ", " + user.FirstName);
            }
            comboBox1.SelectedIndex   = 0;
            ComponentBox.SelectedText = "";
            foreach (IssueStatus issueStatus in IssueStatusRepository.GetAll())
            {
                comboBox2.Items.Add(issueStatus.Value);
            }
            comboBox2.SelectedIndex = 0;
        }
Ejemplo n.º 4
0
        private void FormRecordIssue_Load(object sender, EventArgs e)
        {
            dateTimediscovery.MaxDate      = DateTime.Now;
            dateTimediscovery.Value        = DateTime.Today;
            dateTimediscovery.Format       = DateTimePickerFormat.Custom;
            dateTimediscovery.CustomFormat = "hh:mm:ss tt dd MMM yyyy";

            int newId = 1;

            foreach (AppUser appUser in userRepository.GetAll())
            {
                comboBoxdiscoverer.Items.Add(appUser.LastName + ", " + appUser.FirstName);
            }

            foreach (IssueStatus issueStatus in issueStatusRepository.GetAll())
            {
                comboBoxstatus.Items.Add(issueStatus.Value);
            }

            foreach (Issue issue in issueRepository.GetAll(_SelectedProjectId))
            {
                newId++;
            }
            this.CenterToScreen();

            textBoxid.Text = newId.ToString();
        }
Ejemplo n.º 5
0
        private void FormModifyIssue_Load(object sender, EventArgs e)
        {
            //FakeIssueStatusRepository myStatus = new FakeIssueStatusRepository();


            P5.FakeAppUserRepository users = new P5.FakeAppUserRepository();
            List <P5.AppUser>        usrs  = users.GetAll();

            FakeIssueStatusRepository issues   = new FakeIssueStatusRepository();
            List <IssueStatus>        myissues = new List <IssueStatus>();

            myissues = issues.GetAll();

            foreach (P5.AppUser usr in usrs)
            {
                string name = usr.LastName + ", " + usr.FirstName;
                this.disc.Items.Add(name);
            }

            foreach (IssueStatus isSt in myissues)
            {
                this.issStatus.Items.Add(isSt.Value);
            }
            this.issueID.Text    = issToModify.id.ToString();
            this.issueTitle.Text = issToModify.Title;
            this.discDate.Text   = issToModify.DiscoveryDate.ToString();
            this.disc.Text       = issToModify.Discoverer;
            this.issComp.Text    = issToModify.Component;
            this.issStatus.Text  = issues.GetValueById(issToModify.IssueStatusid);
            this.initDesc.Text   = issToModify.Component;
        }
Ejemplo n.º 6
0
        private void RecordIssue_Load(object sender, EventArgs e)
        {
            this.CenterToParent();
            textBox1.Text = issueRepository.GetNextID().ToString();
            List <IssueStatus> issueStatuses = fakeIssueStatusRepository.GetAll();

            foreach (IssueStatus issue in issueStatuses)
            {
                comboBoxStatus.Items.Add(issue.value);
            }
            comboBoxStatus.SelectedIndex = 0;
            FakeAppUserRepository fakeAppUserRepository = new FakeAppUserRepository();
            List <AppUser>        appUsers = fakeAppUserRepository.GetAll();

            foreach (AppUser user in appUsers)
            {
                comboBoxDiscoverer.Items.Add(user.UserName);
            }
        }