Time of Update: 2018-12-07
1.TreeView的操作涉及 ItemHandle(相當與指標),跟TreeViewItem(資料節點)需要注意的是TreeViewItem是結構體按傳值方式運作2.節點的引用都是基於ItemHandle進行的3.一個節點添加時設定其Children為false,但是當給其添加子節點後其children將變成true(需要使用getitem再次擷取)4.ItemPopulate
Time of Update: 2018-12-07
//使用子查詢//SQL: Select * From KB_BOMTable Where PartNo in (Select PartNO From KB_MPS Where MPSId='00001')var q1=DBCtx.KB_BOMTable.Where(ent => DBCtx.KB_MPS.Where(t => t.MPSId == MPSId).Select(t =>
Time of Update: 2018-12-07
protected T TryParser<T>(object v, T dValue) { if (v == null) { return dValue; } else { T t = default(T); try {
Time of Update: 2018-12-07
99%的情況下沒必要多加一個RegexOptions.Compiled選項 而編譯後帶來的匹配速度提升多數情況下可以忽律不計。 //============================== 如下產生執行個體 Regex regExp = new Regex(@"\$List:\{(.*)\}\$", RegexOptions.IgnoreCase | RegexOptions.Singleline | RegexOptions.Compiled);
Time of Update: 2018-12-07
環境.net4.0 使用NetTcpBinding 概要執行個體管理可以理解為服端怎麼管理(建立與銷毀)Service
Time of Update: 2018-12-07
Time of Update: 2018-12-07
二層交換器工作在鏈路層,負責資料楨的轉寄,一個資料楨包含來源MAC,目標MAC,(ARP楨目標MAC不指定)交換器負責將一個連接埠(物理上的)上收到的楨轉寄給另外的連接埠,由於一個連接埠對應一或多個MAC(對應多個MAC是交換器級連時出現的情況)所以交換器實現了MAC->MAC的資料包轉寄,MAC表學習過程:任何楨發送到交換器上時至少包含源MAC,因此交換器就可以記錄一條(連接埠,MAC)記錄到“連接埠MAC映射表”,針對那些交換器無法找到目標連接埠的目標MAC地址(可能是ARP楨的6位元
Time of Update: 2018-12-07
1.在UI上設定ReportViewer控制項的Rdlc模板後,再在代碼裡設定Rdlc,發現綁定資料後顯示不了資料,重新拖個ReportViewer不設定則正常了2.設定39碼時,務必在前後加*,如:"*" & data & "*"3.保證報表的寬度跟高度加留白>=主體的的寬度高度加留白>=內部控制項的...防止列印時多出頁面4.128碼需要對資料進行編碼View Code private string Get128CodeString(string
Time of Update: 2018-12-07
動易siteFactory設定檔比較繁雜,對很多不是做.net web編程使用者來說鑿實頭痛,下面將網站web.config內容做一簡單的解釋,以及如何修改.配置聲明節 <configSections> <section name="enterpriseLibrary.ConfigurationSource"
Time of Update: 2018-12-07
VS2010帶的EF4.0用用還不錯,建立表後直接從資料產生實體模型挺方便的,資料庫更改後重建模型時不會把模型中的關係覆蓋了(終於不再抓狂了),建資料庫表時不建主外鍵約束,表的關係通過EF實體關聯在模型中加入。下面是一典型的多級分類表針對這個表建立自關聯,詳細如下1.Children導覽屬性視圖2.Parent導覽屬性視圖3.相關性檢視4.參考條件約束完成上面步驟後就可以通過categoryEnt.Parent來擷取父類以及通過categoryEnt.Children來擷取子類.
Time of Update: 2018-12-07
SET IDENTITY_INSERT 表名 ONinsert into 表名(欄位,欄位,欄位) values (64,'kof','kyo')SET IDENTITY_INSERT 表名OFF=================特別注意要顯式制定列名========================= 今天在處理資料庫過程中碰到這樣的問題在插入一條資料到表中系統報這樣的錯誤僅當使用了列的列表,並且 IDENTITY_INSERT 為 ON
Time of Update: 2018-12-07
using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Collections.Concurrent;namespace PDAJob.PDAService.Service{ public class CacheList<T> { private int MaxSize = 10000; private int
Time of Update: 2018-12-07
臨時備忘View Code using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Linq;using System.Text;using System.Windows.Forms;using ARSoft.Tools.Net.Dns;using System.Net;using
Time of Update: 2018-12-07
1.使用代碼對繫結控制項附值後需要調用BindingSource1.EndEdit(),以提交編輯到對應的資料來源2.有總數、金額、單價三個輸TextBox,結果發現每次切換表格選中行時,記錄老變成修改狀態,找了半天發現是因為在總數,金額的TextChanged中會自動計算單價並其設定txtUnitPrice.Text=xxx.xx,引起的解決代碼 decimal amount = 0; decimal totalMoney = 0;
Time of Update: 2018-12-07
動易這套系統的資料擷取模組,是基於.Net2.0開發的,裡用到了Asp.net Ajax,WebService,線程式等技術. 具體實現思路是: 資料擷取類PowerEasy.Collection.CollectionProgress 的StartCreate()中啟動資料擷取線程 代碼如下: private void StartCreate() { this.m_CreateThread = new Thread(new ThreadStart(this.Work));
Time of Update: 2018-12-07
定義如下兩個函數,用來調用.Net的視窗與方法,只支援string類型的參數View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Reflection;using System.Windows.Forms;namespace DotNetExt{ public class Util { public string
Time of Update: 2018-12-07
1.一個Job可以關聯多個觸發器,每個觸發器獨立觸發任務執行<job><job-detail><name>TmpLockedManagerJob</name><group>CustomerManager</group><description>Tmp Locked Manager
Time of Update: 2018-12-07
Delete from Table From Table inner join TableOther On Table.Id=TableOther.Id 注意上面是兩個FromView Code Declare @rowCount intDeclare @SQL nvarchar(1000)set @rowCount=0Set @SQL=''select @RowCount=count(1) from KB_Lable_IsScanSyncwhere IsSync=1Set
Time of Update: 2018-12-07
如果發布的dll檔案需要配置時,可以考慮把配置資訊轉到app.config,當然也可以不轉移直接使用xxx.dll.config中的配置,當然需要保證程式執行目錄下已經copy有xxx.dll.config檔案了代碼入下,加入了檔案監視緩衝View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Configuration;using
Time of Update: 2018-12-07
QQ官方的解釋其實有點糾結,但是提供的Demo還是比較清晰的,對一般有會員模組的網站來說,只要20來行代碼就可以整合QQ登入功能參考QQ官方文檔:http://wiki.opensns.qq.com/wiki/%E3%80%90QQ%E7%99%BB%E5%BD%95%E3%80%91Qzone_OAuth%E8%AE%A4%E8%AF%81%E7%AE%80%E4%BB%8B QQ