跳到主要內容

發表文章

目前顯示的是 2015的文章

中華電推電子發票 下月上路

  中華電推電子發票 下月上路 中華電明年元月起,電信費的收據將全面改以無實體電子發票。圖/中華電信提供 雲端電子發票時代來臨!中華電配合財政部各地區國稅局推動公用事業導入電子發票實施方案,從明年元月1日開始,用戶每月繳完電信費的收據,將全面改以無實體電子發票開立。 中華電表示,未來消費者可至雲端系統或次月帳單上查詢發票資訊。除了一般發票獎項外,民眾還有機會抽中無實體電子發票的專屬獎項。 不只抽獎機會增加,基於很多民眾沒有保存發票或定期對獎的習慣,而與大獎擦身而過,中華電的電子發票系統還會自動幫客戶對獎,免除發票保存及對獎的麻煩。 中華電表示,電信費收據導入無實體電子發票後,仍會維持每月寄送實體或電子帳單服務,繳費方式亦不受影響。 消費者繳費後每月的發票資料,除了可以到中華電的電子發票系統(https://invoice.cht.com.tw/)、中華電客服App、門市及客戶服務專線123(手機撥800)查詢外,還可以在下個月帳單中看到上月繳費後的發票號碼,多元查詢方式讓消費者發票資訊不漏接。 無實體電子發票的好康也不少,中華電指出,除了一般發票抽獎外,還可參加總獎金超過千萬元的無實體電子發票專屬抽獎,也就是每期統一發票開獎後,中華電更將主動為客戶對獎,若幸運中獎,中華電就會以掛號將中獎的紙本發票證明聯提供給中獎人,以便利民眾兌獎。無實體發票專屬獎項共有100萬元獎項10組、2,000元獎項5千組。 另外,雲端電子發票也可以為營業人打造專屬載具編號申報扣抵,客戶可依中華電帳單上專屬載具編號申報扣抵銷項稅額,免再附任何紙本憑證。同時,配合營業人客戶報稅需要,中華電提早於2015年12月份營業人繳費通知單上提供「扣抵聯」及「載具號碼」兩種報稅憑證資料,方便12月31日(含)前繳費者申報,明年元月1日(含)以後繳費者則須以「載具編號」報稅。 (工商時報)  

[MVC] OAuthWebSecurity / WebSecurity 使用者角色(Roles)控管

OAuthWebSecurity / WebSecurity 使用者角色(Roles)控管 使用OAuthWebSecurity / WebSecurity要對登入的使用者設定角色 其實很簡單 只要在註冊程序中加上  Roles.AddUserToRole(UserName, "Role") 如此 該使用者就會有Role的角色 可以用 [Authorize(Roles:="User")]的方式來限定使用者的權限了 當然要使用前 要先建好角色 建立角色的方法如下 Roles.CreateRole("Role")

[Vb.net] asp.net MVC DotNetOpenAuth 串接自有SQLserver

asp.net MVC 提供了DonNetOpenAuth的元件,  讓網站要串接社群網站的SSO變的很容易,  但是直接引用DonNetOpenAuth範例是會自動建立一個mdf檔 就無法使用原本要接的SQL server。  這裡是提供修改範例code的方式 讓DotNetOpenAuth照既定程式, 在SQL server中建立相關的table  1.修改web.config 在web.config中加上SQLserver的連接資訊 [add connectionstring="Data Source=server;Initial Catalog=coolstay;Integrated Security=False;user id=userID;password=password" name="Connection" providername="System.Data.SqlClient"] 2.修改InitializeSimpleMembershipAttribute.vb的連接設定 WebSecurity.InitializeDatabaseConnection("Connection", "UserProfile", "UserId", "UserName", autoCreateTables:=True) 3.修改AccountModels.vb連接設定 Public Sub New() MyBase.New("Connection") End Sub 如此一來 執行系統就會在SQLserver上 建立好相關的table了

JS apply Angulars controller

js  var s = angular.element($('#DivID')).scope();  s.genData(t,m); //Call Controller function  s.$apply(function () {}); //Initial Controller app.controller('Ctrl', function ($scope, $http,$sce) {     $scope.title=""     $scope.message=""     $scope.genData=function(t,m){             $scope.title=t;             $scope.message=m;     }      $scope.renderHtml = function(html_code)      {         return $sce.trustAsHtml(html_code);      }; }); html  [div id="DivID"  ng-controller="msgLightboxCtrl" ]          [div class="row"]             [div class="col-sm-12"]                  [h3 class="title"]{{title}}[/h3]                 [p class="message" ng-bind-html="renderHtml(message)"][/p]             [/div]          [/div]      [/div]

using Entity Framework 6 with MySQL databases

To start working with VS 2013 and EF 6  1- Install the MySQL for Visual Studio 1.1.1  2- Install the Connector/Net 6.8.1 product.  3- To work with Database first please do the following  a. Add the reference for the new assembly called MySql.Data.Entity.EF6 and copy it to the bin forlder of your application.  b. Add the provider to your app/web config file on the providers for Entity Framework section with the following line:  [provider invariantName="MySql.Data.MySqlClient" type="MySql.Data.MySqlClient.MySqlProviderServices, MySql.Data.Entity.EF6"][/provider] c. Before you run the Wizard compile your application so the new changes are applied.  4- To work with Model First please do the following  a. Add the reference for the new assembly called MySql.Data.Entity.EF6 and copy it to the bin forlder of your application.  b. Add the ADO.Net Entity Model new or existing.  c. Select the T4 template corresponding to MySQL (SSDLToMySQL)  d. Right click on the

[Excel ]Excel 錯誤 元素結束標記中的名稱必須和開始標記中的元素型別相符

開啟excel出現錯誤訊息 「已移除的部分: /xl/sharedStrings.xml 部分具有 XML 錯誤。  元素結束標記中的名稱必須和開始標記中的元素型別相符。」 主要原因是excel檔案中的資料是用xml存放 有因為不明的原因xml的tag不match導致的 其實xlsx的結構是 把xml的資料zip起來 所以如果把xlsx的檔案zip解開會出現 資料夾的結構 在從中間找到 /xl/sharedStrings.xml 用純文字的編輯器打開 要找出沒有match的標記是相當困難的 不過可以先用搜尋的方式去找出數量不match的tag 例如我的這個資料的結構是大都是 xxxx 但搜尋 有301個 搜尋/si>   --->確有300個 所以看來就是少了一個 然後再用取代的方式把固定的term 就可以找出單獨缺少的位置 再把缺的tag補上 存回資料

[JQuery] set Select Default

                        var el = $('#SelectID'); // Select the relevant option, de-select any others el.val("Man").attr('selected', true).siblings('option').removeAttr('selected'); // jQM refresh el.selectmenu("refresh", true);

Worklight Serve Install process

1.install Java 1.7.0 2.Install DB2 [Account] / [PWD]  3.Install Installation Manager 4.Install Websphere Liberty 5.Create Websphere Server >server create  WLserver 6.Start Service : IBM Secure Shell Server for Windows 7.Install IDM WorkLight Server IBM DB2 Driver for JDBC C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar 8.RUN Worklight Server Configuration Tool Create New Configuration console Settings [V] Install Worklight Console /worklightconsole JDBC C:\Program Files\IBM\SQLLIB\java\db2jcc4.jar Create a default user admin /[PWD] 9. RUN Websphere Server [WLserver] >server start WLserver 10. open http://localhost:9080/appcenterconsole/console.html appcenteradmin /admin