private void init_next_list(int row_idx)
        {
            next_id_list.Clear();
            next_id_list.Add(bug_update.Bug_id);
            if (tableBug.Rows[row_idx][10].ToString().Length != 0)
            {
                int next_id = int.Parse(tableBug.Rows[row_idx][10].ToString().Trim());
                init_next_id_list(next_id);
            }
            int tail_id = next_id_list[next_id_list.Count - 1];

            lastTable.Bug_id     = tail_id;
            lastTable.Bug_status = TableBug.Select_From_Table_Bug(tail_id);

            Console.WriteLine(String.Format("Bug_status={0}", lastTable.Bug_status.ToString()));
            bug_ays_version_combo.Items.Clear();

            for (int i = 0; i < next_id_list.Count; i++)
            {
                bug_ays_version_combo.Items.Add(next_id_list[i]);
            }

            bug_ays_version_combo.Enabled       = true;
            bug_ays_version_combo.SelectedIndex = 0;
        }
Beispiel #2
0
        private void waiting_audit_grid_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            int row_idx     = waiting_audit_grid.CurrentCell.RowIndex;
            int selected_id = int.Parse(waiting_audit_grid.Rows[row_idx].Cells[0].Value.ToString());

            tableAuditBug.Bug_id = selected_id;


            int    reason       = 0;
            string bug_analysis = "";
            string description  = (string)tableBug.Rows[row_idx][4];
            int    status       = int.Parse(tableBug.Rows[row_idx][0].ToString().Trim());

            tableAuditBug.Bug_status = status;


            if (status != 1)
            {
                reason       = int.Parse(tableBug.Rows[row_idx][8].ToString().Trim());
                bug_analysis = (string)tableBug.Rows[row_idx][12];
                bug_cre_audit_reason.SelectedIndex = reason - 1;
                bug_cre_audit_analysis.Text        = bug_analysis;


                //初始化bug版本控制
                next_id_list.Clear();
                next_id_list.Add(tableAuditBug.Bug_id);
                if (tableBug.Rows[row_idx][10].ToString().Length != 0)
                {
                    int next_id = int.Parse(tableBug.Rows[row_idx][10].ToString().Trim());
                    init_next_id_list(next_id);
                }
                if (next_id_list.Count > 1)
                {
                    bug_audit_btn_accompanished.Enabled = false;
                }
                else
                {
                    if (status == 2)
                    {
                        bug_audit_btn_accompanished.Enabled = true;
                    }
                }

                int tail_id = next_id_list[next_id_list.Count - 1];
                lastTable.Bug_id     = tail_id;
                lastTable.Bug_status = TableBug.Select_From_Table_Bug(tail_id);

                Console.WriteLine(String.Format("Bug_status={0}", lastTable.Bug_status.ToString()));
                bug_audit_vision_combo.Items.Clear();

                for (int i = 0; i < next_id_list.Count; i++)
                {
                    bug_audit_vision_combo.Items.Add(next_id_list[i]);
                }

                bug_audit_vision_combo.Enabled       = true;
                bug_audit_vision_combo.SelectedIndex = 0;
            }
            else
            {
                //next_id_list.Clear();
                bug_audit_vision_combo.Enabled = false;
                bug_audit_vision_combo.Items.Clear();
            }

            int case_id = int.Parse(tableBug.Rows[row_idx][9].ToString().Trim());

            tableAuditBug.Case_id              = case_id;
            bug_cre_audit_lbl_id.Text          = selected_id.ToString();
            bug_audit_auditing_id.Text         = selected_id.ToString();
            bug_cre_audit_desc.Text            = description;
            bug_cre_audit_status.SelectedIndex = status - 1;


            if (status == 3)
            {
                bug_cre_audit_status.Enabled        = false;
                bug_audit_btn_accompanished.Enabled = false;
            }
            else if (status == 2)
            {
                tableAuditBug.Bug_status     = 2;
                bug_cre_audit_status.Enabled = true;
                //    bug_audit_btn_accompanished.Enabled = true;
            }
            else
            {
                tableAuditBug.Bug_status            = 1;
                bug_cre_audit_status.Enabled        = false;
                bug_audit_btn_accompanished.Enabled = true;
            }
        }