摘要: 今天遇到一個問題,環境如下:IIS Server: Server 2008 R2 沒加域File Server: Server 2003 加域當我的Web程序需要把位於File Server的一個EXCEL檔當成資料庫時卻發生拒絕存取的問題public ActionResult CNC() { //1.把EXCEL複製到本機 if (!System.IO.Directory.Exists(@"D:\System Temp")) { // 目录不存在,建立目录 ... 阅读全文
posted @ 2014-03-06 14:35 Ren.Auxo 阅读(419) 评论(0) 推荐(0) 编辑
摘要: 1.OverView一般程式只會查找與主程式同目錄的DLL檔案解決方案主要可以參考這篇:http://support.microsoft.com/kb/8379082.實作app.config方式這種方式我們需要DLL的「publicKeyToken」和「version」屬性此時可以運作一下製作好的程式,當找不到DLL的時候會報以下錯誤:從這當中可以找到這兩個屬性接著在app.config加入以下code就可以了!(裡面的Code) PS.調用的DLL原檔如下 阅读全文
posted @ 2013-12-04 11:43 Ren.Auxo 阅读(174) 评论(0) 推荐(0) 编辑
摘要: 目標:點選按鈕後可以打印其他頁面的內容,可用於套版、內部表單套印...等等。程式碼:1.View(HTML布局) 1 維修申請單 2 3 4 5 6 @Html.Label("dept", "申請部門") 7 8 9 10 @Html.Label("deviceType", "設備類型")11 12 13 14 @Html.Label("deviceId", "設備編號")15 16 17 18 @Html.Label("problemType", &qu 阅读全文
posted @ 2013-08-23 10:52 Ren.Auxo 阅读(2513) 评论(0) 推荐(0) 编辑
摘要: 我目前有以下表單,Select部分因為必須上一層有選擇下層才有資料,因此使用jQuery驗證問題類型是否有選擇就好,而問題描述要驗證是否為空,這裡採用MVC內建的DataAnnotations來驗證。1.View(HTML)視圖顯示的布局如下 1 維修申請單 2 3 4 5 6 @Html.Label("dept", "申請部門") 7 8 9 10 @Html.Label("deviceType", "設備類型")11 12 13 14 @Html.Label("deviceId", &quo 阅读全文
posted @ 2013-08-22 11:14 Ren.Auxo 阅读(353) 评论(0) 推荐(0) 编辑
摘要: 剛開始學MVC4,以下是一些基礎的學習筆記!先展示一下結果:1.選擇申請部門2.選好後申請部門鎖住防止USER修改並載入該部門所擁有的設備類型一、資料庫deptmf_fx二、View (Index.cshtml)@model IEnumerable@{ ViewBag.Title = "Index";}維修申請單 @Html.Label("dept","申請部門") @Html.Label("deviceType","設備類型") 三、Controller (RepairController.c 阅读全文
posted @ 2013-08-19 15:30 Ren.Auxo 阅读(1802) 评论(0) 推荐(1) 编辑
摘要: 剛開始學MVC4,以下是一些基礎的學習筆記!完成效果像下面這樣,資料來源是既有的Database。1.Controllerpublic ActionResult Index() { SqlConnection DbErp = new SqlConnection(ErpString); //創建資料庫連線 SqlCommand cmd = new SqlCommand("select dep,name from dept",DbErp); //輸入SQL命令 DbErp.Open(); //開啟資料庫連線 ... 阅读全文
posted @ 2013-08-16 17:46 Ren.Auxo 阅读(863) 评论(0) 推荐(0) 编辑