跳到主要內容

發表文章

Html Table To Excel / Txt

string content = " <table border=\"1\" style=\"border-top:1px solid black;font-size:10px\" > ";             content += "<tr>  <td colspan=\"2\"> <b>標題一</b> </td>    <td colspan=\"2\"> <b>標題二</b> </td>  </tr> ";             content += "<tr style=\"color:red\"> <td> A</td> <td>B  </td>  <td>C </td> <td>D  </td> </tr> ";             content += "<tr>  <td> 2 </td> <td  style=\"text-align:right\">" + (char)2 + "3.6100  </td>  <td>112 </td> <td>3.05 </td> </tr> ";             content += " <tr> <td> A</td> <td>B  </td>  <td>C </td> <td>D </td> </tr>";     ...

ASP.NET USE BonduleConfig.cs / Bondule.config

BonduleConfig.cs :------------------------------------------------------------ bundles.Add(new ScriptBundle("~/bundles/jquery").Include(                    "~/Scripts/jquery-{version}.js")); bundles.Add(new ScriptBundle("~/bundles/jqueryui").Include(                     "~/Scripts/jquery-ui-{version}.js"));  Bondule.config:------------------------------------------------------------ <styleBundle path="~/Content/css">       <include path="~/Content/bootstrap.css" />       <include path="~/Content/Site.css" />   </styleBundle> xxx.aspx------------------------------------------------------------ <asp:PlaceHolder runat="server">                     <%: Scripts.Render("~/bundles/jquery") %>          <%: Scripts.Re...

ROW_NUMBER() / PARTITION BY / RANK() OVER / DENSE_RANK() OVER

SELECT ROW_NUMBER() OVER (ORDER BY account_no) as RowNumNo , * from account_item --RowNumNo         seq_no                  code_no                   account_no        name --30                15                A                5201115                其他材料 --31                16                A                5201120                投入成本 --32                17                A                5201200  ...

Mulit Thread 切割資料筆數執行

 public partial class MultiThread : Form     {         List<string> DTtype = new List<string>()         {             "D","F"         };         public MultiThread()         {             InitializeComponent();         }         private void button1_Click(object sender, EventArgs e)         {             DataSet dsDomestic = new DataSet();  //56 ROWS             DataSet dsForeign = new DataSet();  //21 ROWS             int domestic = 56;   //假設要執行的資料庫的 DataSet 筆數, 要先排序再做 RowNumber()             int foreign = 21;   //假設要執行的資料庫的 DataSet 筆數, 要先排序再做 RowNumber()     ...

ThreadStart/ Thread/ ParameterizedThreadStart /delegate

public partial class ThreadTest : Form     {            Thread Thd1;         Thread Thd2;         private delegate void DelegateLabelController(Label lbl, int i);               public ThreadTest()         {             InitializeComponent();         }         private void button1_Click(object sender, EventArgs e)         {             button1.Enabled = false;             Application.DoEvents();             ThreadStart Ts1 = new ThreadStart(Process1);  //執行緒起動要呼叫的function             ThreadStart Ts2 = new ThreadStart(Process2);             Thd1 = new Thread(Ts1);    //ThreadStart ...