the column prefix '.' does not match
1. select table full name
2. add ligin propertiel
SELECT
b.[name] as [專案名稱]
,a.[name] as [dtsx名稱]
FROM SSISDB.catalog.packages as a
left join SSISDB.catalog.projects as b on a.project_id = b.project_id
order by b.[name] asc ,a.[name] asc
20221013 li_control = 1 非常重要,可直接選點選該行
//當kind = 1 (LC)必須在phf170s有資料 =0筆 清空欄位並錯誤訊息
//當kind = 2 (TT)必須在phf170s沒有資料 < 1筆 否則清空欄位並錯誤訊息
long ll_row2
string ls_order_no2 , ls_seq_no2
int ll_cnt
ll_row2 = tab_1.tabpage_1.dw_1s.getrow()
ls_order_no2 = tab_1.tabpage_1.dw_1s.getitemstring(ll_row2,"order_no")
select count(*) into :ll_cnt
from phf170s
where phf170s.order_no = :ls_order_no2
using sqlca;
if ls_kind = '1' and ll_cnt=0 then
err_msg(2,2,"@@1"+"此~訂~購~單~不~為~類~別~LC"+"@")
li_control = 1
tab_1.tabpage_1.dw_1s.setcolumn("order_no")
tab_1.tabpage_1.dw_1s.setitem(row, "order_no", '')
goto itemchanged_exit
elseif ls_kind = '2' and ll_cnt>0 then
err_msg(2,2,"@@1"+"此~訂~購~單~不~為~類~別~TT"+"@")
li_control = 1
tab_1.tabpage_1.dw_1s.setcolumn("order_no")
tab_1.tabpage_1.dw_1s.setitem(row, "order_no", '')
goto itemchanged_exit
end if
20220905 要另外解開不然所有按鈕不能按
20220901 選取全部column迴圈設定(會排除按鈕butten)
ll_col = long(tab_1.tabpage_1.dw_1.describe("datawindow.column.count"))
for ll_i = 1 to ll_col
tab_1.tabpage_1.dw_1.SetTabOrder(ll_i, 0)
next
20220830 在pb中insert
insert into trf100_mail_20220830 ( send_no, keyin_emp, crt_time, crt_user )
values ( :ls_send_no, :ls_keyin_emp, getdate(), :ls_loginuid)
commit using sqlca; //不用等到全部程式完成,直接insert
20220111
取得dw row while loop 讀出(計算或寫入DB)
long ll_dw3_count,ll_dw3_rowcount,ll_dw3_row
ll_dw3_rowcount = tab_1.tabpage_1.dw_3.rowcount()
ll_dw3_count = 1
do while ll_dw3_count <= ll_dw3_rowcount
ll_dw3_row = tab_1.tabpage_1.dw_3.GetRowFromRowId(ll_dw3_count)
ls_dw3_out = tab_1.tabpage_1.dw_3.getitemstring(ll_dw3_row,"out_no")
ls_dw3_part = tab_1.tabpage_1.dw_3.getitemstring(ll_dw3_row,"part_no")
ls_dw3_pick = tab_1.tabpage_1.dw_3.getitemstring(ll_dw3_row,"ls_pick")
ll_dw3_count = ll_dw3_count+1
loop
20220111
產生亂數 Rand ( n ) EX:1~32767
20211228 提示訊息選是或否才執行
//確認刪掉的有符合資產檔累計折舊=0才有以刪除
li_rtn = wf_check_del(ls_proj,ls_auto_nos,ls_auto_noe,ls_auto_dates,ls_auto_datee)
if li_rtn > 0 then //回傳0以上表示累計折舊大於零的筆數
err_msg(2,2,"@@1"+"累計折舊大於零無法刪除!"+"@")
//tab_1.tabpage_1.dw_1.setcolumn("out_date")
goto buttonclicked_exit
else
ls_rtn2 = wf_del_count(ls_proj,ls_auto_nos,ls_auto_noe,ls_auto_dates,ls_auto_datee)
if MessageBox('提示信息','確定刪除所選資料共'+ls_rtn2+'筆',Question! ,YesNo! , 1 ) = 1 then
wf_del(ls_proj,ls_auto_nos,ls_auto_noe,ls_auto_dates,ls_auto_datee)
MessageBox('提示信息', '資料已刪除共'+ls_rtn2+'筆')
else
MessageBox('提示信息','放棄刪除')
end if
end if
20211201
//messagebox轉型數字=>文字
messagebox("percent", string(value)+"%")
20211117
find_text 請注意 powerbuilder6.5 不支援中文查找
20211116
tab_1.tabpage_1.dw_1.settaborder("cust_no", 0)
//將taborder設定為0 => 不能點選object , 設為大於0可以點選
tab_1.tabpage_1.dw_1.modify( " cust_no.background.color = '" + gs_ucolor + "'" )
//改變背景顏色
need ddl
npoi vision 2.1.3.1
aspx
<td colspan="3">
<telerik:RadAsyncUpload ID="Q_btnEXCELChk" runat="server" MaxFileInputsCount="1" Localization-Remove="移除"
Localization-Select="瀏覽" ><%--Style="padding: 8px 0px 0px 0px !important; width: 220px!important; font-family: Microsoft JhengHei;"--%>
</telerik:RadAsyncUpload>
</td>
<td colspan="3">
<asp:Label ID="Label2" runat="server" Text="" Width="20%"></asp:Label>
<asp:Button ID="Q_btnEXCEL" runat="server" Text="匯入預算" OnClick="Q_btnEXCEL_Click"/>
</td>
--------------------------------------------
aspx.cs
using NPOI.HSSF.UserModel;
using NPOI.XSSF.UserModel;
using ICSharpCode.SharpZipLib.Zip;
protected void Q_btnEXCEL_Click(object sender, EventArgs e)
{
string MSG = string.Empty;
UploadedFile file = Q_btnEXCELChk.UploadedFiles[0];
//string FileNm = DateTime.Now.ToString("yyyyMMddhhmmss_") + this.USER.EMPNO + ".xls";
//string fileth = "~/Apps/HDGBJ/Upload" + FileNm;
//Q_btnEXCELChk.UploadedFiles[0].SaveAs(Server.MapPath(fileth));
DataTable dtImport = new DataTable();
if (file.GetExtension() == ".xls")
{
HSSFWorkbook workbook_I = new HSSFWorkbook(file.InputStream);
HSSFSheet sheet_I = (HSSFSheet)workbook_I.GetSheetAt(0);
if (sheet_I != null)
{
int DataRowFrom = 1;
int DataColFrom = 0;
int HeaderRowCount = 1;
int RowCount = sheet_I.PhysicalNumberOfRows;
//* 實際匯入資料筆數
int DataRowCount = RowCount - HeaderRowCount;
//* 表頭資料列的欄位總數
int DataColCount = sheet_I.GetRow(0).PhysicalNumberOfCells;
#region 欄位
dtImport.Columns.Add("SEG", typeof(string));
dtImport.Columns.Add("CCID", typeof(string));
dtImport.Columns.Add("ACCIDNM", typeof(string));
dtImport.Columns.Add("M1", typeof(string));
dtImport.Columns.Add("M2", typeof(string));
dtImport.Columns.Add("M3", typeof(string));
dtImport.Columns.Add("M4", typeof(string));
dtImport.Columns.Add("M5", typeof(string));
dtImport.Columns.Add("M6", typeof(string));
dtImport.Columns.Add("M7", typeof(string));
dtImport.Columns.Add("M8", typeof(string));
dtImport.Columns.Add("M9", typeof(string));
dtImport.Columns.Add("M10", typeof(string));
dtImport.Columns.Add("M11", typeof(string));
dtImport.Columns.Add("M12", typeof(string));
//dtImport.Columns.Add("ITEMS", typeof(Int32));
//dtImport.Columns.Add("TRANSFEE", typeof(decimal));
#endregion
#region 塞值--先塞入datatable在做處理
for (int i = 1; DataRowCount > i; i++) //列計數
{
DataRow drImport = dtImport.NewRow();
for (int j = 0; 15 > j; j++) //資料欄位計數
{
drImport[j] = sheet_I.GetRow(i).GetCell(j);
//drImport.Table.Rows[i-1][j]= sheet_I.GetRow(i).GetCell(j);
//dtImport.Rows[i-1][j] =
}
dtImport.Rows.Add(drImport);
}
#endregion
}
}
else if (file.GetExtension() == ".xlsx")
{
///建立Excel 2007檔案
XSSFWorkbook workbook_I = new XSSFWorkbook(file.InputStream);
XSSFSheet sheet_I = (XSSFSheet)workbook_I.GetSheetAt(0);
if (sheet_I != null)
{
int DataRowFrom = 1;
int DataColFrom = 0;
int HeaderRowCount = 1;
int RowCount = sheet_I.PhysicalNumberOfRows;
//* 實際匯入資料筆數
int DataRowCount = RowCount - HeaderRowCount;
//* 表頭資料列的欄位總數
int DataColCount = sheet_I.GetRow(0).PhysicalNumberOfCells;
#region 欄位
dtImport.Columns.Add("SEG", typeof(string));
dtImport.Columns.Add("CCID", typeof(string));
dtImport.Columns.Add("ACCIDNM", typeof(string));
dtImport.Columns.Add("M1", typeof(string));
dtImport.Columns.Add("M2", typeof(string));
dtImport.Columns.Add("M3", typeof(string));
dtImport.Columns.Add("M4", typeof(string));
dtImport.Columns.Add("M5", typeof(string));
dtImport.Columns.Add("M6", typeof(string));
dtImport.Columns.Add("M7", typeof(string));
dtImport.Columns.Add("M8", typeof(string));
dtImport.Columns.Add("M9", typeof(string));
dtImport.Columns.Add("M10", typeof(string));
dtImport.Columns.Add("M11", typeof(string));
dtImport.Columns.Add("M12", typeof(string));
//dtImport.Columns.Add("ITEMS", typeof(Int32));
//dtImport.Columns.Add("TRANSFEE", typeof(decimal));
#endregion
#region 塞值--先塞入datatable在做處理
for (int i = 1; DataRowCount > i; i++) //列計數
{
DataRow drImport = dtImport.NewRow();
for (int j = 0; 15 > j; j++) //資料欄位計數
{
drImport[j] = sheet_I.GetRow(i).GetCell(j);
//drImport.Table.Rows[i-1][j]= sheet_I.GetRow(i).GetCell(j);
//dtImport.Rows[i-1][j] =
}
dtImport.Rows.Add(drImport);
}
#endregion
}
}
else
{
this.Master.AjaxManager.Alert("檔案格式錯誤");
MSG = "檔案格式錯誤";
//檔案錯誤
}
if (MSG == "")
{
//整理datatable
if (dtImport.Rows.Count > 0)
{
//移除沒有CCID的資料列
for (int i = 0; dtImport.Rows.Count > i; i++)
{
if (dtImport.Rows[i]["CCID"].ToString() == "")
{
// dt.Rows[i].Delete();
dtImport.Rows.RemoveAt(i);
}
}
db.Inport(dtImport, COMPID, Q_ddlDATAYEAR.SelectedValue.ToString(), Q_ddlYEARTYPE.SelectedValue.ToString());
}
}
}
Declare @ps_houses char(2)
Declare @ps_housee char(2)
Declare @ps_dates char(8)
Declare @ps_datee char(8)
set @ps_houses = '01'
set @ps_housee = '31'
set @ps_dates = (select convert(varchar(8),getdate(),112))
set @ps_datee = (select convert(varchar(8),getdate(),112))
Declare @SQL_str varchar(3000)
set @SQL_str='SELECT distinct
trf100s.send_no,
trf100s.tranio_no,
trf100s.raw_no,
trf100s.part_no,
saf300s.send_qty,
saf300s.scan_qty,
saf300s.send_qty - saf300s.scan_qty as no_scanqty ,
baf008.cust_no,
baf008.cust_sname,
trf100.house_no,
baf014.house_name
FROM trf100s
LEFT JOIN trf100 ON trf100s.send_no = trf100.send_no
LEFT JOIN baf008 ON baf008.cust_no = trf100s.cust_no
LEFT JOIN saf300s ON trf100s.send_no = saf300s.send_no
and trf100s.tranio_no = saf300s.tranio_no
and trf100s.part_no = saf300s.part_no
LEFT JOIN baf014 ON trf100.house_no = baf014.house_no
WHERE
saf300s.send_qty - saf300s.scan_qty > 0
and left(saf300s.tranio_no,2) <> ''DI''
and saf300s.barcode_yn = ''Y''
and trf100.house_no between ''' + @ps_houses +''' and ''' +@ps_housee + ''' and convert(char(8),trf100.send_date,112) between '''+ @ps_dates + ''' and '''+ @ps_datee
SET @SQL_str = 'SELECT * into TMP_LHDBTRP100 FROM OpenQuery(LHDB, ''' + REPLACE(rtrim(@SQL_str)+'''', '''', '''''')+ ''')'
EXEC(@SQL_str)
select object_name(id),* from syscomments
where texttype = 0 and
(text like '%turnkey_date%'
or text like '%turnkey_pick%'
or text like '%turnkey_canceldate%'
or text like '%etrndt%'
)
;
這個錯誤是說明
從DB搜尋的值,有包含null
困難在於,錯誤不一定會顯示位置,有2個方向查找
1. 檢查C#中,從DB來做轉換的欄位,可以設定null給空白
string SEG6 = (string)dataRow["SEG6"];
string SEG6NM = (string)dataRow["SEG6NM"];
2. 檢查搜尋出的值,如下圖,在依欄位找出要修改的地方,或修改where條件,不可以null
此報表的定義無效,或是這個版本的 Reporting Services 不支援該報表定義。報表定義可能是以較新版本的 Reporting Services 所建立,或是含有格式不完整或不適用於 Reporting Services 結構描述的內容。詳細資料: 報表定義具有無效的目標命名空間 'http://schemas.microsoft.com/sqlserver/reporting/2016/01/reportdefinition',此命名空間無法升級。
1. 請修改屬性目標server
3.重建後的RDL檔,會放在bin\Debug裡,用該檔上傳Server即可
function formatCurrency(num) {
num = num.toString().replace(/\$|\,/g, '');
if (isNaN(num))
num = "0";
sign = (num == (num = Math.abs(num)));
num = Math.floor(num * 100 + 0.50000000001);
cents = num % 100;
num = Math.floor(num / 100).toString();
if (cents < 10)
cents = "0" + cents;
for (var i = 0; i < Math.floor((num.length - (1 + i)) / 3); i++)
num = num.substring(0, num.length - (4 * i + 3)) + ',' +
num.substring(num.length - (4 * i + 3));
return (((sign) ? '' : '-') + num + '.' + cents);
}
function IsIntText(textControl) {
var str = textControl.value;
var regexp = /^([1-9][0-9]*)$/; //正整數
// ^-?\d+$ 整數含負數
var msg = '';
if (!regexp.test(textControl.value)) {
msg = '數字格式不正確!';
}
if (parseInt(str, 10).toString() == '0') { //表示輸入的是0或0.00啦
msg = '數字格式不可為0!';
}
if( msg != ''){
alert(msg);
textControl.value = "";
}
else{
//檢查都過後重算總金額
//把數字傳給數值欄位計算總金額
//把字串欄位變成貨幣單位(千分位帶逗點)
var fgvD2 = document.getElementById("ctl00_ContentPlaceHolder1_fgvD2");
var totalAMT = 0; //總金額
var AlltotalAMT = 0; //總金額
var ORDERAMT = 0; //單價
var ORDERNUM = 0 ; //數量
if (fgvD2.rows.length > 0) {
for (var i = 1; i < fgvD2.rows.length; i++) {
totalAMT = 0;
//字串去除逗號
//數量字串欄位
ORDERNUM = fgvD2.rows[i].cells[3].getElementsByTagName("input")[0].value;
ORDERNUM = ORDERNUM.replace(new RegExp(",", ''),''); //replaceall
//單價字串欄位
ORDERAMT = fgvD2.rows[i].cells[4].getElementsByTagName("input")[0].value;
ORDERAMT = ORDERAMT.replace(new RegExp(",", ''),''); //replaceall
//單價傳給數值欄位 在.cs pageload給值
//fgvD2.rows[i].cells[4].getElementsByTagName("input")[1].value = ORDERAMT;
//總金額 = 總金額 + 數量 * 單價
totalAMT = (ORDERNUM * ORDERAMT);
AlltotalAMT = AlltotalAMT + (ORDERNUM * ORDERAMT);
//總金額傳給數值欄位 在.cs pageload給值
//fgvD2.rows[i].cells[5].getElementsByTagName("input")[1].value = totalAMT;
//金額字串欄位加上貨幣符號(千分位帶逗點)
fgvD2.rows[i].cells[4].getElementsByTagName("input")[0].value = formatCurrency(ORDERAMT).toString();
fgvD2.rows[i].cells[5].getElementsByTagName("input")[0].value = formatCurrency(totalAMT).toString();
//隱藏td關閉
//document.getElementById('tdORDERAMT').style.display = 'none';
//document.getElementById('tdTOTALAMT').style.display = 'none';
}
document.getElementById("ctl00_ContentPlaceHolder1_lbTOTALAMT").innerText = formatCurrency(AlltotalAMT).toString();
document.getElementById("ctl00_ContentPlaceHolder1_ftbALLTOTALAMT").value = formatCurrency(AlltotalAMT).toString();
}
}
}
function IsfloatText(textControl) {
var str = textControl.value;
var str = textControl.value;
var regexp = /^[0-9]+.[0-9]{1,2}?$/; //帶2位小數正實數 發現10A1這種無法找出 下方修補邏輯
var regexp2 = /^([1-9][0-9]*)$/; //正整數
var msg = '';
if (!regexp.test(textControl.value) && !regexp2.test(textControl.value)) { //整數或小數
msg = '數字格式不正確!';
}
var regexp2 = /[A-Za-z]/
if (regexp2.test(textControl.value)) { //若包含字母
msg = '數字格式不正確!';
}
if (parseFloat(str, 10).toString() == '0') { //表示輸入的是0或0.00啦
msg = '數字格式不可為0!';
}
if (msg != '') {
alert(msg);
textControl.value = "";
}
else {
//檢查都過後重算總金額
//把數字傳給數值欄位計算總金額
//把字串欄位變成貨幣單位(千分位帶逗點)
var fgvD2 = document.getElementById("ctl00_ContentPlaceHolder1_fgvD2");
var totalAMT = 0; //總金額
var AlltotalAMT = 0; //總金額
var ORDERAMT = 0; //單價
var ORDERNUM = 0; //數量
if (fgvD2.rows.length > 0) {
for (var i = 1; i < fgvD2.rows.length; i++) {
totalAMT = 0;
//字串去除逗號
//數量字串欄位
ORDERNUM = fgvD2.rows[i].cells[3].getElementsByTagName("input")[0].value;
ORDERNUM = ORDERNUM.replace(/,/, '');
//單價字串欄位
ORDERAMT = fgvD2.rows[i].cells[4].getElementsByTagName("input")[0].value;
ORDERAMT = ORDERAMT.replace(/,/, '');
//單價傳給數值欄位 在.cs pageload給值
//fgvD2.rows[i].cells[4].getElementsByTagName("input")[1].value = ORDERAMT;
//總金額 = 總金額 + 數量 * 單價
totalAMT = (ORDERNUM * ORDERAMT);
AlltotalAMT = AlltotalAMT + (ORDERNUM * ORDERAMT);
//總金額傳給數值欄位 在.cs pageload給值
//fgvD2.rows[i].cells[5].getElementsByTagName("input")[1].value = totalAMT;
//金額字串欄位加上貨幣符號(千分位帶逗點)
fgvD2.rows[i].cells[4].getElementsByTagName("input")[0].value = formatCurrency(ORDERAMT).toString();
fgvD2.rows[i].cells[5].getElementsByTagName("input")[0].value = formatCurrency(totalAMT).toString();
//隱藏td關閉
//document.getElementById('tdORDERAMT').style.display = 'none';
//document.getElementById('tdTOTALAMT').style.display = 'none';
}
document.getElementById("ctl00_ContentPlaceHolder1_lbTOTALAMT").innerText = formatCurrency(AlltotalAMT).toString();
document.getElementById("ctl00_ContentPlaceHolder1_ftbALLTOTALAMT").value = formatCurrency(AlltotalAMT).toString();
}
}
}
ASPX
<script type="text/javascript">
function FORZENToDo() {
var msg = '將執行預算凍結,凍結後無法修改預算';
if (confirm(msg)) {
return false;
}
return true;
}
</script>
<asp:Button ID="E_btnFORZEN" runat="server" Text="凍結(待審核)" OnClick="E_btnFORZEN_Click" OnClientClick="if(FORZENToDo()){return false}" Width="15%" />
ASPX.cs
protected void E_btnFORZEN_Click(object sender, EventArgs e)
{
//要執行的動作
}
當出現此訊息,標準說明網路很多"物件尚未實體化就呼叫它的屬性或方法",
以下為自己遇到的以及處理方式,作為紀錄
表示有設定的物件,可能是DataTable、Int、String、陣列、object等等,未設定值(沒有值),就直接使用
1.一般的
EX
DataTable dt = null ;
Q_txtBNKNM.Text = dt.Rows[0]["BNKNM"].ToString(); \\這裡就會出錯
這種debug會直接斷在這裡,很好處理
--------------------------------------------------------------------------------
2. 比較難查的,通常是已經包在dll的程式,吐回來的訊息,不會說明斷哪裡
a. 利用搜尋,查找相關的程式檔案(關鍵字是自己會用到datatable or 陣列等等名稱)
b. 程式前後文,也有可能造成此問題,前半寫好,後段尚未完成,但只想驗證前面時,也會 發生,會發生在有參數互相傳遞的程式間
做為紀錄方便自己查詢
<script type="text/javascript">
function TotalAmtD1() {
var totalAMT = 0;
var dataItems = $find('<%=gvMulti.ClientID%>').get_masterTableView().get_dataItems();
for (var i = 0; i < dataItems.length; i++) {
var AMT = dataItems[i].get_element().cells(2).innerText; //get grid value
if (AMT == " " || AMT =="NaN") {
AMT = dataItems[i].get_cell("AMT").getElementsByTagName("input")[0].value; //if innerText = " " get Textbox value
}
if (AMT == " " || AMT == "NaN") {
AMT = 0 // All fail get 0
}
totalAMT = parseInt(totalAMT) + parseInt(AMT);
}
document.getElementById("<%= E_txtTOTALAMT.ClientID %>").value = totalAMT;
}
</script>
<ILS:ILSRadGrid ID="gvMulti" runat="server" AllowPaging="True" AllowSorting="True"
AutoGenerateColumns="False" GridLines="None" Skin="Office2007" DataMember="dtMain"
Height="400px" PageSize="200" ShowFooter="false" Width="98%" OnItemDataBound="gvMulti_itemDataBound" a
CellSpacing="0" AlwaysShowEditMode="False" DelChekBoxID="M_chkDEL" DelImageBtnID="M_imgDEL">
<ILSCommandItemSettings ShowAddNewRecordButton="true" />
<ILSColumnSettings AutoGenerateRowIndexColumn="true" AutoGenerateDelColumn="false" />
<%--客戶端設定--%>
<%--分頁設定--%>
<FilterMenu EnableImageSprites="False">
</FilterMenu>
<HeaderContextMenu CssClass="GridContextMenu GridContextMenu_Default">
</HeaderContextMenu>
<ClientSettings AllowColumnsReorder="false" ReorderColumnsOnClient="false">
<KeyboardNavigationSettings AllowSubmitOnEnter="false" />
<Selecting AllowRowSelect="True"></Selecting>
<ClientEvents OnRowClick="GridRowClick" />
<%--OnRowDblClick="GridRowClick"--%>
<Scrolling AllowScroll="true" SaveScrollPosition="true" UseStaticHeaders="true" ScrollHeight="80px" />
</ClientSettings>
<MasterTableView CommandItemDisplay="None" EditMode="InPlace" DataMember="dtMain"
TableLayout="Fixed" RetrieveNullAsDBNull="false" Width="100%">
<EditFormSettings>
<EditColumn FilterControlAltText="Filter EditCommandColumn column">
</EditColumn>
</EditFormSettings>
<CommandItemSettings ExportToPdfText="Export to Pdf"></CommandItemSettings>
<RowIndicatorColumn FilterControlAltText="Filter RowIndicator column">
</RowIndicatorColumn>
<ExpandCollapseColumn FilterControlAltText="Filter ExpandColumn column">
</ExpandCollapseColumn>
<Columns>
<telerik:GridTemplateColumn HeaderText="月份" UniqueName="DATAMONTH"
ItemStyle-Wrap="false" SortExpression="MONTH">
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "DATAMONTH").ToString().Trim() == string.Empty ?
" " : DataBinder.Eval(Container.DataItem, "DATAMONTH").ToString().Trim()%>
</ItemTemplate>
<HeaderStyle Width="70px" HorizontalAlign="Center" />
<ItemStyle Width="70px" HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
<telerik:GridTemplateColumn HeaderText="<font color='red'>*</font>預算金額" UniqueName="AMT"
ItemStyle-Wrap="false" SortExpression="AMT">
<EditItemTemplate>
<ILS:ILSTextBox runat="server" ID="M_intAMT" Title="預算金額" ColumnName="AMT"
MaxLength="12" ValidationGroup="vgSave" Text='<%# Bind("AMT") %>' onchange="return TotalAmtD1();"
Width="98%" ValidType="Number" Style="text-align: right">
</ILS:ILSTextBox>
</EditItemTemplate>
<ItemTemplate>
<%#DataBinder.Eval(Container.DataItem, "AMT").ToString().Trim() == string.Empty ?
" " : DataBinder.Eval(Container.DataItem, "AMT").ToString().Trim()%>
</ItemTemplate>
<HeaderStyle Width="70px" HorizontalAlign="Center" />
<ItemStyle Width="70px" HorizontalAlign="Center" />
</telerik:GridTemplateColumn>
在使用TableAdapter作Query時發生 1. 原因為有些資料欄位Query出來後為null值 但是該欄位在dbDataSet的屬性AllowDBNull為False 因此把該欄位(或乾脆把全部欄位屬性AllowDBNull改為True 2. maxLength 檢...