Esempio n. 1
0
        private void launchLootLogWindow(string name)
        {
            lootLogForm.Close();
            lootLogForm = new frmLootLog(Location.X, Location.Y);

            lootLogForm.Text = "Loot Lot for: " + name;
            lootLogForm.getView().SortCompare += new DataGridViewSortCompareEventHandler(lootSummarySorter);

            StringBuilder sql = new StringBuilder();

            sql.AppendLine("SELECT strftime('%m/%d/%Y', loot_date),");
            sql.AppendLine("       short_event_name,");
            sql.AppendLine("       item,");
            sql.AppendLine("       slot,");
            sql.AppendLine("       rot,");
            sql.AppendLine("       alt_loot,");
            sql.AppendLine("       (SELECT DISTINCT is_special FROM items AS i WHERE UPPER(l.item) = UPPER(i.item))");
            sql.AppendLine("FROM   loot AS l");
            sql.AppendLine("WHERE  name = '" + DBManager.safeParam(name) + "'");
            sql.AppendLine("ORDER BY loot_date");

            DbDataReader rs = DBManager.getManager().executeQuery(sql.ToString());

            while (rs.Read())
            {
                lootLogForm.getView().Rows.Add(new string[] { rs[0].ToString(), rs[1].ToString(), rs[2].ToString(), rs[3].ToString(), rs[4].ToString(), rs[5].ToString(), rs[6].ToString() });
            }

            rs.Close();

            lootLogForm.ShowDialog();
        }
Esempio n. 2
0
        private void launchLootLogWindow(string name)
        {
            lootLogForm.Close();
            lootLogForm = new frmLootLog(Location.X, Location.Y);

            lootLogForm.Text = "Loot Lot for: " + name;
            lootLogForm.getView().SortCompare += new DataGridViewSortCompareEventHandler(lootSummarySorter);

            StringBuilder sql = new StringBuilder();
            sql.AppendLine("SELECT strftime('%m/%d/%Y', loot_date),");
            sql.AppendLine("       short_event_name,");
            sql.AppendLine("       item,");
            sql.AppendLine("       slot,");
            sql.AppendLine("       rot,");
            sql.AppendLine("       alt_loot,");
            sql.AppendLine("       (SELECT DISTINCT is_special FROM items AS i WHERE UPPER(l.item) = UPPER(i.item))");
            sql.AppendLine("FROM   loot AS l");
            sql.AppendLine("WHERE  name = '" + DBManager.safeParam(name) + "'");
            sql.AppendLine("ORDER BY loot_date");

            DbDataReader rs = DBManager.getManager().executeQuery(sql.ToString());

            while (rs.Read()) {
                lootLogForm.getView().Rows.Add(new string[] { rs[0].ToString(), rs[1].ToString(), rs[2].ToString(), rs[3].ToString(), rs[4].ToString(), rs[5].ToString(), rs[6].ToString() });
            }

            rs.Close();

            lootLogForm.ShowDialog();
        }