Beispiel #1
0
        public static List <CmbItem> GetRole()
        {
            conn.Open();
            SqlCommand     sqlCmd    = new SqlCommand("select ID, Description from Role where ID != '" + "R5" + "'", conn);
            SqlDataReader  sqlReader = sqlCmd.ExecuteReader();
            List <CmbItem> roleList  = new List <CmbItem>();

            while (sqlReader.Read())
            {
                var cmbItem = new CmbItem(sqlReader["ID"].ToString(), sqlReader["Description"].ToString());
                roleList.Add(cmbItem);
            }
            return(roleList);
        }
        public void TestcaseList()
        {
            conn.Open();
            List <CmbItem> tcList        = new List <CmbItem>();
            SqlCommand     TestcaseQuery = new SqlCommand("SELECT ID, (ID + '  ' + Name) as Name FROM Testcases WHERE SubSystemID = '" + SubSystemIDTemp + "' order by DateTime ASC", conn);
            SqlDataReader  TestcaseRead  = TestcaseQuery.ExecuteReader();

            while (TestcaseRead.Read())
            {
                var cmbItem = new CmbItem(TestcaseRead["ID"].ToString(), TestcaseRead["Name"].ToString());
                tcList.Add(cmbItem);
            }
            conn.Close();
            cmbTestcase.DataSource    = tcList;
            cmbTestcase.DisplayMember = "Text";
            cmbTestcase.ValueMember   = "Text";
            cmbTestcase.SelectedIndex = 0;
        }
Beispiel #3
0
        void ProjectInfo()
        {
            conn.Open();
            List <CmbItem> itemList  = new List <CmbItem>();
            SqlCommand     sqlCmd    = new SqlCommand("select ID, Name from Projects", conn);
            SqlDataReader  sqlReader = sqlCmd.ExecuteReader();

            while (sqlReader.Read())
            {
                var cmbItem = new CmbItem(sqlReader["ID"].ToString(), sqlReader["Name"].ToString());
                itemList.Add(cmbItem);
            }
            conn.Close();
            cmbProject.DataSource    = itemList;
            cmbProject.DisplayMember = "Text";
            cmbProject.ValueMember   = "ID";
            cmbProject.SelectedIndex = 0;
        }
Beispiel #4
0
        void subsystemlist()
        {
            string projectID = cmbProject.SelectedValue.ToString();

            conn.Open();

            SqlCommand     sqlCmd    = new SqlCommand("select ID, Description from SubSystem Where ProjectID = '" + projectID + "'", conn);
            SqlDataReader  sqlReader = sqlCmd.ExecuteReader();
            List <CmbItem> itemList  = new List <CmbItem>();

            while (sqlReader.Read())
            {
                var cmbItem = new CmbItem(sqlReader["ID"].ToString(), sqlReader["Description"].ToString());
                itemList.Add(cmbItem);
            }
            conn.Close();
            cmbSubSystem.DataSource    = itemList;
            cmbSubSystem.DisplayMember = "Text";
            cmbSubSystem.ValueMember   = "Id";
        }
Beispiel #5
0
        void AssigneeList()
        {
            subsystemid();
            conn.Open();
            List <CmbItem> asList        = new List <CmbItem>();
            SqlCommand     AssigneeQuery = new SqlCommand("SELECT ID, Name FROM Users where ID in (select UserID from Assignment where UserID != '"
                                                          + this.UserIDDD.ToString() + "' AND SubSystemID = '" + subSystem.ToString() + "')", conn);

            SqlDataReader AssigneeRead = AssigneeQuery.ExecuteReader();

            while (AssigneeRead.Read())
            {
                var cmbItem = new CmbItem(AssigneeRead["ID"].ToString(), AssigneeRead["Name"].ToString());
                asList.Add(cmbItem);
            }
            conn.Close();
            cmbAssignee.DataSource    = asList;
            cmbAssignee.DisplayMember = "Text";
            cmbAssignee.ValueMember   = "Text";
        }