예제 #1
0
        private void listBox_History_DoubleClick(object sender, EventArgs e)
        {
            if (this.historyItems == null)
            {
                return;
            }

            if (this.historyItems.Count <= 0)
            {
                return;
            }

            ScrumQueue.BussinessLogic.History h = ((ScrumQueue.BussinessLogic.History) this.listBox_History.SelectedItem);
            UIHistory uh = new UIHistory(h, this.historyItems, this.listBox_History.SelectedIndex);

            uh.ShowDialog();
        }
예제 #2
0
        public static List<History> GetHistoryOfItem(Item item)
        {
            ScrumQueue.IOLogic.DBAccess dba = ScrumQueue.IOLogic.DBAccess.CreateConnection();

            System.Data.SqlClient.SqlDataReader reader = dba.execSP("GetHistoryBasedOnItemID",
                    new string[] { "@ItemID" },
                    new string[] { item.ItemID.ToString() });

            List<History> l = new List<History>(20);
            while (reader.Read())
            {
                //HistoryID, ItemID, Title, Note, CreateDate, U1.username 'CreatedBy', EditDate, U2.username 'EditedBy', ST.Name 'Status', HistoryType
                int hid = int.Parse(reader["HistoryID"].ToString());
                string title = reader["Title"].ToString();
                string note = reader["Note"].ToString();
                DateTime editDate = DateTime.Parse(reader["EditDate"].ToString());
                string editedUser = reader["EditedBy"].ToString();
                string status = reader["Status"].ToString();
                string historyType = reader["HistoryType"].ToString();

                History h = new History(hid, item.ItemID, title, note, editDate, editedUser, status, historyType);

                l.Add(h);
            }

            dba.CloseConn();
            return l;
        }