コード例 #1
0
$dg = new sadaf_datagrid("SIGrid", $js_prefix_address . "../data/salary_item_report.data.php?task=searchSITR", "SIDIV");
$dg->addColumn("کد قلم", "SalaryItemReportID", "", true);
$dg->addColumn("وضعیت", "state", "", true);
$col = $dg->addColumn("عنوان قلم", "SalaryItemTitle", "string");
$col->editor = ColumnEditor::TextField(true);
$col->width = 150;
$col = $dg->addColumn("شرح", "description", "string");
$col->editor = ColumnEditor::TextField(true);
$col = $dg->addColumn("ذی نفع", "BeneficiaryID", "integer");
$col->editor = ColumnEditor::ComboBox(manage_domains::GETALL_beneficiary(), "BeneficiaryID", "title");
$col->width = 80;
$col = $dg->addColumn("نوع قلم", "ItemType", "integer");
$col->editor = ColumnEditor::ComboBox(array(array("ItemType" => "1", "title" => "متفرقه"), array("ItemType" => "2", "title" => "خزانه")), "ItemType", "title");
$col->width = 80;
$col = $dg->addColumn("نوع فرد", "PersonType", "integer");
$col->editor = ColumnEditor::ComboBox(manage_domains::GETALL_PersonType(), "InfoID", "Title");
$col->width = 80;
$col = $dg->addColumn("سال", "PayYear", "integer");
$col->editor = ColumnEditor::NumberField(true);
$col->width = 70;
$col = $dg->addColumn("ماه", "PayMonth", "integer");
$col->editor = ColumnEditor::NumberField(true);
$col->width = 70;
$col = $dg->addColumn("مبلغ", "ItemValue", "integer");
$col->editor = ColumnEditor::NumberField(true);
$col->width = 80;
$col = $dg->addColumn("عملیات", "", "string");
$col->renderer = "function(v,p,r){return SalaryItemReport.opRender(v,p,r);}";
$col->width = 50;
$dg->addButton = true;
$dg->addHandler = "function(){SalaryItemReportObject.AddSIR();}";