Example #1
0
        private void BindStatusData(string role)
        {
            var listStatus = new List <DefectStatus>();
            var status1    = new DefectStatus("New");

            listStatus.Add(status1);
            cmbStatus.DataSource    = listStatus;
            cmbStatus.DisplayMember = "Description";
            cmbStatus.ValueMember   = "Description";
        }
Example #2
0
        private void BindStatusData(string role)
        {
            var listStatus = new BindingList <DefectStatus>();
            // var listStatus = new List<DefectStatus>();
            var Assigned = new DefectStatus("Assigned");
            var Fixed    = new DefectStatus("Fixed");
            var Rejected = new DefectStatus("Rejected");
            var Closed   = new DefectStatus("Closed");
            var Verified = new DefectStatus("Verified");
            var Reopened = new DefectStatus("Reopened");
            var New      = new DefectStatus("New");

            if (role == "R1") //Tester
            {
                listStatus.Add(Assigned);
                listStatus.Add(Fixed);
                listStatus.Add(Reopened);
                listStatus.Add(Verified);
                listStatus.Add(Closed);
                cmbStatus.Enabled = true;
            }
            else if (role == "R2") //Developer
            {
                listStatus.Add(Fixed);
                listStatus.Add(Rejected);
                listStatus.Add(Reopened);
                cmbStatus.Enabled = true;
            }
            else if ((role == "R3") || (role == "R4"))
            {
                listStatus.Add(New);
                listStatus.Add(Assigned);
                listStatus.Add(Fixed);
                listStatus.Add(Reopened);
                listStatus.Add(Closed);
            }
            cmbStatus.DataSource    = listStatus;
            cmbStatus.DisplayMember = "Description";
            cmbStatus.ValueMember   = "Description";
            //  cmbAssignee.Enabled = true;
            cmbStatus.Enabled = true;
        }