在 Grid 前加入序號

CodeCharge Studio 2.x, 3.x, 4.x, 5.x
回覆文章
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

在 Grid 前加入序號

文章 yehlu »

stock_in_no_BeforeShow

global $no;
$no++;
$stock_in->no->setvalue($no);
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

方式2 結合序號與總計

文章 yehlu »

stock_in_BeforeShowRow

global $showrow;
$showrow["no"]++;
$stock_in->no->setvalue($showrow["no"]);
$showrow["total"] += $stock_in->total->getvalue();


Label1_BeforeShow
global $showrow;
$Label1->setvalue($showrow[total]);
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

最新方法

文章 yehlu »

$sell_a->row_sn->SetValue($sell_a->RowNumber + ($sell_a->PageNumber-1)*$sell_a->PageSize);
yehlu
Site Admin
文章: 3244
註冊時間: 2004-04-15 17:20:21
來自: CodeCharge Support Engineer

總計的做法

文章 yehlu »

計算 Before Show Row Event
global $grid_total;
$grid_total["amount"] += $xxx->yyy->GetValue();

顯示 Label1 Before Event
global $grid_total;
$str = "數量合計:".$grid_total["amount"];
$str .= "含稅合計:".number_format($grid_total["price"]);
$str .= "成本合計:".number_format($grid_total["price_in"]);
$Label1->SetValue($str);
回覆文章

回到「CodeCharge Studio」