private void menu_DownXls_S_ITEM_Result(Object sender, EventArgs e) { FolderBrowserDialog fbd = new FolderBrowserDialog(); fbd.SelectedPath= Basic_HTB_Info.cfg.TempdataKey("path2"); if (fbd.ShowDialog() == DialogResult.OK) { Basic_HTB_Info.cfg.tempdata["path2"] = fbd.SelectedPath; MPPFORM.ListBoxForm lbf = new MPPFORM.ListBoxForm(); using (OdbcConnection conn = new OdbcConnection(Basic_HTB_Info.Conn_Str)) { conn.Open(); OdbcDataReader dr = new OdbcCommand("select si_id,s_item,rcx from sport_item;", conn).ExecuteReader(); while (dr.Read()) { if (dr[1].ToString().Contains("跳") || dr[1].ToString().Contains("球")) continue; lbf.lb.Items.Add(String.Format("{0}:{1}:{2}", dr[0], dr[1], dr[2])); } if (lbf.ShowDialog() == DialogResult.OK) { foreach (string s in lbf.lb.CheckedItems) { string[] s_ar = s.Split(':'); string si_id = s_ar[0]; string item = s_ar[1]; string rcx = s_ar[2]; string f_name = String.Format("{0}\\{1}.xls", fbd.SelectedPath, item); RC_Html_Output rc_html_p = new RC_Html_Output(si_id, item, rcx, conn, f_name,new RC_S_GR()); } } conn.Close(); } } }
private void btn_RC_Html_Output_Click(object sender, EventArgs e) { RC_Html_Output h_o_xls = new RC_Html_Output(sport_id, sport_item, sport_rcx, conn, temp_Out_Html_filename.Replace(".htm",".xls"), new RC_S_GR()); RC_Html_Output h_o = new RC_Html_Output(sport_id, sport_item, sport_rcx, conn, temp_Out_Html_filename,new RC_S_GR()); Form_RC_OUT_RESULT out_r = new Form_RC_OUT_RESULT(h_o.html_filename); out_r.MdiParent = this.MdiParent; out_r.Show(); RC_Html_Output_BlankTable h_o_blanktable = new RC_Html_Output_BlankTable(sport_id, sport_item, sport_rcx, conn, temp_Out_Html_filename, new RC_S_GR()); }