国产一级a片免费看高清,亚洲熟女中文字幕在线视频,黄三级高清在线播放,免费黄色视频在线看

打開APP
userphoto
未登錄

開通VIP,暢享免費(fèi)電子書等14項(xiàng)超值服

開通VIP
將數(shù)據(jù)導(dǎo)入Excle
 protected void Button1_Click(object sender, EventArgs e)
    {
       // List<LoginLog> lis = new List<LoginLog>();
     // string sql = "select top 10 * from LoginLog where loginid not in (select top (10 * (@cuttpager-1)) loginid from LoginLog order by loginid) order by loginid";
       // string path= ExCEl.query_table_getdata(@"D:/tex/text/Excle/",sql);
     //  DataTable tb = DBHper.GetTable(sql,new SqlParameter("@cuttpager",pager));
        List<LoginLog> list = LoginLogService.GetList2(pager);

       
        string str = "<table width=100% border=1 bgcolor=black cellspacing=1>";
        str += "<tr bgcolor=yellow>";
        str += "<td width=100px style='text-align:center '>" + "登陸ID" + "</td>";
        str += "<td width=100px style='text-align:center '>" + "用戶名稱" + "</td>";
        str += "<td width=100px style='text-align:center '> " + "登陸時(shí)間" + "</td>";
        str += "<td width=100px style='text-align:center '>" + "登陸IP" + "</td>";
        str += "<td width=100px style='text-align:center '>" + "登陸時(shí)候成功" + "</td>";
        str += "<td width=100px style='text-align:center '>" + "登陸描述" + "</td>";
        str += "</tr>";
        foreach (LoginLog log in list)
        {
            str += "<tr bgcolor=white>";
            str += "<td width='100px' style='text-align:center '>" + log.LoginId + "</td>";
            str += "<td width='100px' style='text-align:center '>" + log.UserId + "</td>";
            str += "<td width='100px' style='text-align:center '>" + log.LoginTime + "</td>";
            str += "<td width='100px' style='text-align:center '>" + log.LoginUserIp + "</td>";
            if (log.IfSuccess == 1)
            {
                str += "<td width='100px' style='text-align:center '>" + "成功" + "</td>";
            }
            else
            {
                str += "<td width='100px' style='text-align:center '>" + "失敗" + "</td>";
            }
           
            str += "<td width='100px' style='text-align:center '>" + log.LoginDesc + "</td>";
            str += "</tr>";
        }
        str += "</table>";
        using (StreamWriter writer = new StreamWriter(Server.MapPath("~/Excle/TextFile.xls"), false, System.Text.Encoding.Default))
        {
            writer.WriteLine(str);
            Response.Redirect("~/Excle/TextFile.xls");
        }
 
}
這是一個(gè)簡(jiǎn)單的將數(shù)據(jù)導(dǎo)入Excle的例子
       
本站僅提供存儲(chǔ)服務(wù),所有內(nèi)容均由用戶發(fā)布,如發(fā)現(xiàn)有害或侵權(quán)內(nèi)容,請(qǐng)點(diǎn)擊舉報(bào)
打開APP,閱讀全文并永久保存 查看更多類似文章
猜你喜歡
類似文章
香氣撲面又聞南紅
樹枝飛鳥,雨暈Flash素材//0定位代碼
教您改善命運(yùn)的秘訣
一組秋雨圖GIF命令
實(shí)用的萬(wàn)年歷及代碼
【代碼應(yīng)用】用代碼制作顏色邊框
更多類似文章 >>
生活服務(wù)
分享 收藏 導(dǎo)長(zhǎng)圖 關(guān)注 下載文章
綁定賬號(hào)成功
后續(xù)可登錄賬號(hào)暢享VIP特權(quán)!
如果VIP功能使用有故障,
可點(diǎn)擊這里聯(lián)系客服!

聯(lián)系客服