本文整理汇总了PHP中sadaf_datagrid::addButton方法的典型用法代码示例。如果您正苦于以下问题:PHP sadaf_datagrid::addButton方法的具体用法?PHP sadaf_datagrid::addButton怎么用?PHP sadaf_datagrid::addButton使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类sadaf_datagrid
的用法示例。
在下文中一共展示了sadaf_datagrid::addButton方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1:
$col->editor = ColumnEditor::SHDateField();
$col->align = "center";
$col = $dg->addColumn("مبلغ پرداخت", "PayAmount", GridColumn::ColumnType_money);
$col->editor = ColumnEditor::CurrencyField();
$col->width = 120;
$col->align = "center";
if (isset($_SESSION["USER"]["framework"])) {
$col = $dg->addColumn("شماره سند حسابداری", "LocalNo");
$col->align = "center";
$col->renderer = "function(v,p,r){return PartPayment.DocRender(v,p,r);}";
$col->width = 120;
}
if ($editable && $accessObj->AddFlag) {
$dg->enableRowEdit = true;
$dg->rowEditOkHandler = "function(store,record){return PartPaymentObject.SavePartPayment(record);}";
$dg->addButton("AddBtn", "ایجاد ردیف پرداخت", "add", "function(){PartPaymentObject.AddPay();}");
if ($accessObj->RemoveFlag) {
$col = $dg->addColumn("حذف", "");
$col->sortable = false;
$col->renderer = "function(v,p,r){return PartPayment.DeleteRender(v,p,r);}";
$col->width = 35;
}
}
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 270;
$dg->width = 410;
$dg->EnableSearch = false;
$dg->EnablePaging = false;
$dg->DefaultSortField = "PayDate";
$dg->DefaultSortDir = "ASC";
$grid = $dg->makeGrid_returnObjects();
示例2: MiladiToShamsi
$col = $dg->addColumn("تاریخ مورد نظر", "FromDate");
$col->renderer = "function(v,p,r){return MiladiToShamsi(v) + ' - ' + MiladiToShamsi(r.data.ToDate); }";
$col->width = 140;
$col = $dg->addColumn("ساعت", "StartTime");
$col->width = 60;
$col->align = "center";
$col = $dg->addColumn("تا ساعت", "EndTime", "");
$col->width = 60;
$col->align = "center";
$col = $dg->addColumn("توضیحات", "details", "");
$col->ellipsis = 40;
$col = $dg->addColumn("عملیات", "");
$col->sortable = false;
$col->renderer = "function(v,p,r){return SurveyRequests.OperationRender(v,p,r);}";
$col->width = 60;
$dg->addButton("", "بایگانی درخواست", "archive", "function(){return SurveyRequestsObject.ArchiveRequest();}");
$dg->addObject('this.AllReqsObj');
$dg->height = 500;
$dg->width = 750;
$dg->autoExpandColumn = "details";
$dg->DefaultSortField = "ReqDate";
$dg->emptyTextOfHiddenColumns = true;
$grid = $dg->makeGrid_returnObjects();
?>
<style>
.infoTbl td{
padding : 4px;
}
</style>
<center>
<form id="mainForm">
示例3:
$editable = true;
$dg = new sadaf_datagrid("dg", $js_prefix_address . "letter.data.php?task=GetLetterNotes&LetterID=" . $LetterID, "grid_div");
$dg->addColumn("", "NoteID", "", true);
$dg->addColumn("", "LetterID", "", true);
$col = $dg->addColumn("عنوان یادداشت", "NoteTitle");
$col->editor = ColumnEditor::TextField();
$col->width = 200;
$col = $dg->addColumn("شرح", "NoteDesc");
$col->editor = ColumnEditor::TextField();
$col = $dg->addColumn("یادآوری", "ReminderDate", GridColumn::ColumnType_date);
$col->editor = ColumnEditor::SHDateField(true);
$col->width = 110;
if ($editable) {
$dg->enableRowEdit = true;
$dg->rowEditOkHandler = "function(store,record){return LetterNoteObject.SaveLetterNote(record);}";
$dg->addButton("AddBtn", "ایجاد یادداشت جدید", "add", "function(){LetterNoteObject.Add();}");
$col = $dg->addColumn("حذف", "");
$col->sortable = false;
$col->renderer = "function(v,p,r){return LetterNote.DeleteRender(v,p,r);}";
$col->width = 35;
}
$dg->autoExpandColumn = "NoteDesc";
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 410;
$dg->width = 750;
$dg->EnableSearch = false;
$dg->EnablePaging = false;
$dg->DefaultSortField = "NoteDesc";
$dg->DefaultSortDir = "ASC";
$grid = $dg->makeGrid_returnObjects();
?>
示例4:
$dg->addColumn("", "ObjectID", "", true);
$dg->addColumn("", "IsConfirm", "", true);
$col = $dg->addColumn("مدرک", "DocType", "");
$col->editor = ColumnEditor::ComboBox(PdoDataAccess::runquery("select * from BaseInfo where typeID=8"), "InfoID", "InfoDesc");
$col->width = 140;
$col = $dg->addColumn("توضیح", "DocDesc", "");
$col->editor = ColumnEditor::TextField(true);
$col = $dg->addColumn("فایل", "FileType", "");
$col->renderer = "function(v,p,r){return PersonalInfo.FileRender(v,p,r)}";
$col->editor = "this.FileCmp";
$col->align = "center";
$col->width = 100;
$col = $dg->addColumn("عملیات", "", "");
$col->renderer = "function(v,p,r){return PersonalInfo.OperationRender(v,p,r)}";
$col->width = 60;
$dg->addButton("", "اضافه مدرک", "add", "function(){PersonalInfoObject.AddDocument();}");
$dg->enableRowEdit = true;
$dg->rowEditOkHandler = "function(){return PersonalInfoObject.SaveDocument();}";
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 330;
$dg->width = 690;
$dg->EnableSearch = false;
$dg->EnablePaging = false;
$dg->DefaultSortField = "DocTypeDesc";
$dg->autoExpandColumn = "DocDesc";
$grid = $dg->makeGrid_returnObjects();
require_once 'PersonInfo.js.php';
?>
<br>
<center>
<div id="mainForm"><div>
示例5:
$col = $dg->addColumn("تاریخ پایان", "EndDate", GridColumn::ColumnType_date);
$col->width = 70;
$col = $dg->addColumn("کارمزد", "wage");
$col->width = 40;
$col->align = "center";
$col = $dg->addColumn("وضعیت", "StepDesc", "");
$col->width = 80;
$col = $dg->addColumn("سند", "LocalNo", "");
$col->width = 40;
$col = $dg->addColumn('عملیات', '', 'string');
$col->renderer = "WarrentyRequest.OperationRender";
$col->width = 50;
$col->align = "center";
$dg->addObject("WarrentyRequestObject.FilterObj");
if ($accessObj->AddFlag) {
$dg->addButton("", "ایجاد ضمانتنامه جدید", "add", "function(){WarrentyRequestObject.AddNew();}");
}
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 500;
$dg->pageSize = 15;
$dg->width = 800;
$dg->title = "ضمانت نامه ها";
$dg->DefaultSortField = "RequestID";
$dg->autoExpandColumn = "fullname";
$grid = $dg->makeGrid_returnObjects();
?>
<script>
WarrentyRequestObject.grid = <?php
echo $grid;
?>
;
示例6: array
$col->editor = "AccDocsObject.ChequeStatusCombo";
$col->renderer = "function(v,p,r){return r.data.StatusTitle}";
$col->width = 80;
if ($accessObj->RemoveFlag) {
$col = $dgh->addColumn("حذف", "", "string");
$col->renderer = "AccDocsObject.check_deleteRender";
$col->width = 50;
$col->align = "center";
}
if ($accessObj->AddFlag) {
$dgh->addButton = true;
$dgh->addHandler = "function(v,p,r){ return AccDocsObject.check_Add(v,p,r);}";
}
$dgh->enableRowEdit = true;
$dgh->rowEditOkHandler = "function(v,p,r){ return AccDocsObject.check_Save(v,p,r);}";
$dgh->addButton("", "چاپ چک", "print", "function(){ return AccDocsObject.printCheck();}");
$dgh->addColumn("", "CheckStatus", "", true);
$dgh->addColumn("", "PrintPage1", "", true);
$dgh->addColumn("", "PrintPage2", "", true);
$dgh->width = 780;
$dgh->DefaultSortField = "DocChequeID";
$dgh->autoExpandColumn = "description";
$dgh->emptyTextOfHiddenColumns = true;
$dgh->DefaultSortDir = "ASC";
$dgh->height = 315;
$dgh->EnableSearch = false;
$dgh->EnablePaging = false;
$checksgrid = $dgh->makeGrid_returnObjects();
//-----------------------------------------
$whereParam = array(":cid" => $_SESSION["accounting"]["CycleID"], ":b" => $_SESSION["accounting"]["BranchID"]);
$dt = PdoDataAccess::runquery("select ifnull(count(*),0) from ACC_docs where CycleID=:cid AND BranchID=:b", $whereParam);
示例7: function
$dg->width = 400;
$dg->height = 500;
$dg->pageSize = 10;
$dg->autoExpandColumn = "UserID";
$dg->title = "لیست کاربران سیستم";
$gridUsers = $dg->makeGrid_returnObjects();
//------------------------------------------------------------------------------
$dg2 = new sadaf_datagrid("dg2", $js_prefix_address . "../data/access.data.php?task=selectCostCenters", "div_grid2", "form_costCenterAccess");
$dg2->addColumn("", "cost_center_id", "", true);
$dg2->addColumn("مرکز هزینه", "title");
$col = $dg2->addColumn('<input type="checkbox" onclick="CostCenterAccessObject.checkAll(this);">انتخاب', "access");
$col->renderer = "CostCenterAccess.accessRender";
$col->width = 60;
$col->sortable = false;
$col->align = "center";
$dg2->addButton("", "ذخیره دسترسی های مراکز هزینه", "save", "function(){CostCenterAccessObject.SaveAccess();}");
$dg2->notRender = true;
$dg2->width = 350;
$dg2->height = 500;
$dg2->title = "لیست مراکز هزینه";
$dg2->autoExpandColumn = "title";
$dg2->EnableSearch = false;
$dg2->EnablePaging = false;
$gridCostCenters = $dg2->makeGrid_returnObjects();
?>
<script>
CostCenterAccess.prototype.afterLoad = function()
{
this.UsersGrid = <?php
echo $gridUsers;
?>
示例8:
$dgh->addColumn("", "MessageID", "", true);
$dgh->addColumn("", "DoneDesc", "", true);
$dgh->addColumn("", "DoneDate", "", true);
$dgh->addColumn("", "RequestID", "", true);
$col = $dgh->addColumn("شرح", "details");
$col->renderer = "function(v,p,r){ return LoanMessagesObj.DescRender(v,p,r);}";
$col->editor = ColumnEditor::TextField();
$col = $dgh->addColumn("زمان ایجاد", "CreateDate", GridColumn::ColumnType_datetime);
$col->width = 120;
$col = $dgh->addColumn("وضعیت", "MsgStatus");
$col->renderer = "function(v,p,r){ return LoanMessagesObj.StatusRender(v,p,r);}";
$col->width = 90;
$col = $dgh->addColumn("زمان اقدام", "DoneDate", GridColumn::ColumnType_datetime);
$col->width = 120;
if (isset($_SESSION["USER"]["portal"]) && $accessObj->AddFlag) {
$dgh->addButton("", "ایجاد پیام جدید", "add", "function(){LoanMessagesObj.AddMessage();}");
$dgh->enableRowEdit = true;
$dgh->rowEditOkHandler = "function(store,record){return LoanMessagesObj.SaveMessage(record);}";
$col = $dgh->addColumn("عملیات", "");
$col->renderer = "function(v,p,r){ return LoanMessagesObj.OperationRender(v,p,r);}";
$col->width = 60;
}
if (isset($_SESSION["USER"]["framework"])) {
$col = $dgh->addColumn("", "");
$col->renderer = "function(v,p,r){ return LoanMessagesObj.ActionRender(v,p,r);}";
$col->width = 30;
}
$dgh->width = 700;
$dgh->DefaultSortField = "CreateDate";
$dgh->autoExpandColumn = "details";
$dgh->DefaultSortDir = "DESC";
示例9:
$col = $dg->addColumn("عنوان کامل واحد سازمانی", "full_unit_title");
$col = $dg->addColumn("رسته", "jobCategory");
$dg->addColumn("", "parent_path", "", true);
//.....................................................
$dg->addButton = true;
$dg->addHandler = "AddPost";
$col = $dg->addColumn("ویرایش", "");
$col->renderer = "GridEdit";
$col->width = 30;
$col = $dg->addColumn("حذف", "");
$col->renderer = "GridRemove";
$col->width = 30;
$col = $dg->addColumn("زیر پست ها", "");
$col->renderer = "subPostRender";
$col->width = 30;
$dg->addButton("back", "برگشت", "undo", "back");
$dg->title = "پست های سازمانی";
$dg->DefaultSortField = "post_id";
$dg->primaryKey = "post_id";
$dg->width = 900;
$dg->height = 500;
$dg->makeGrid();
?>
<body dir="rtl">
<form id="mainForm">
<input type="hidden" id="CurrentPost" name="CurrentPost">
</form>
<table align="center" width="750px">
<tr>
<td valign="top" style="padding-right: 5px" align="center">
<!-- -------------------------------------------- -->
示例10:
$col = $dg->addColumn("صاحب چک", "fullname", "");
$col = $dg->addColumn("حساب", "CostDesc");
$col->width = 100;
$col = $dg->addColumn("شماره چک", "ChequeNo");
$col->renderer = "IncomeCheque.ChequeNoRender";
$col->width = 70;
$col = $dg->addColumn("تاریخ چک", "ChequeDate", GridColumn::ColumnType_date);
$col->width = 80;
$col = $dg->addColumn("مبلغ چک", "ChequeAmount", GridColumn::ColumnType_money);
$col->width = 80;
$col = $dg->addColumn("وضعیت چک", "ChequeStatusDesc", "");
$col->width = 80;
$col = $dg->addColumn("اسناد", "docs", "");
$col->width = 80;
if ($accessObj->EditFlag) {
$dg->addButton("", "اضافه چک", "add", "function(){IncomeChequeObject.AddCheque();}");
$dg->addButton("", "اضافه چکهای اقساط", "add", "function(){IncomeChequeObject.AddLoanCheque();}");
$dg->addButton("", "تغییر وضعیت چک", "refresh", "function(){IncomeChequeObject.beforeChangeStatus();}");
$dg->addButton("", "برگشت عملیات", "undo", "function(){IncomeChequeObject.ReturnLatestOperation();}");
}
if ($accessObj->RemoveFlag) {
$col = $dg->addColumn('حذف', '', 'string');
$col->renderer = "IncomeCheque.DeleteRender";
$col->width = 40;
$col->align = "center";
}
$col = $dg->addColumn("", "", "");
$col->renderer = "IncomeCheque.HistoryRender";
$col->width = 40;
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 400;
示例11:
$dg->addColumn("", "BankDesc", "", true);
$dg->addColumn("", "ChequeBranch", "", true);
$col = $dg->addColumn("سررسید", "InstallmentDate", GridColumn::ColumnType_date);
$col->editor = ColumnEditor::SHDateField();
$col->width = 80;
$col = $dg->addColumn("مبلغ قسط", "InstallmentAmount", GridColumn::ColumnType_money);
$col->editor = ColumnEditor::CurrencyField();
$col = $dg->addColumn("مبلغ جریمه", "ForfeitAmount", GridColumn::ColumnType_money);
$col->width = 80;
$col = $dg->addColumn("مانده", "TotalRemainder", GridColumn::ColumnType_money);
$col->width = 120;
$col = $dg->addColumn("وضعیت تمدید", "IsDelayed");
$col->renderer = "function(v,p,r){ return v == 'YES' ? 'تمدید شده' : '';}";
$col->width = 120;
if ($editable && $accessObj->EditFlag) {
$dg->addButton("cmp_computeInstallment", "محاسبه اقساط", "list", "function(){InstallmentObject.ComputeInstallments();}");
$dg->enableRowEdit = true;
$dg->rowEditOkHandler = "function(store,record){return InstallmentObject.SaveInstallment(store,record);}";
$dg->addButton("", "تمدید اقساط", "delay", "function(){InstallmentObject.DelayInstallments();}");
}
$dg->addButton("cmp_report", "گزارش پرداخت", "report", "function(){InstallmentObject.PayReport();}");
$dg->height = 377;
$dg->width = 755;
$dg->emptyTextOfHiddenColumns = true;
$dg->EnableSearch = false;
$dg->HeaderMenu = false;
$dg->EnablePaging = false;
$dg->DefaultSortField = "InstallmentDate";
$dg->DefaultSortDir = "ASC";
$dg->title = "جدول اقساط";
$dg->autoExpandColumn = "InstallmentAmount";
示例12: MiladiToShamsi
$col->width = 120;
$col = $dg->addColumn("درخواست", "ReqType", "");
$col->width = 100;
$col->renderer = "TrafficReq.ReqTypeRender";
$col = $dg->addColumn("تاریخ مورد نظر", "FromDate");
$col->renderer = "function(v,p,r){return MiladiToShamsi(v) + ' - ' + MiladiToShamsi(r.data.ToDate); }";
$col->width = 140;
$col = $dg->addColumn("ساعت", "StartTime");
$col->width = 60;
$col->align = "center";
$col = $dg->addColumn("تا ساعت", "EndTime", "");
$col->width = 60;
$col->align = "center";
$dg->addColumn("توضیحات", "details", "");
if ($accessObj->AddFlag) {
$dg->addButton("", "ایجاد درخواست جدید", "add", "function(){TrafficReqObject.BeforeAddRequest('new');}");
}
$dg->height = 500;
$dg->width = 750;
$dg->EnablePaging = false;
$dg->DefaultSortField = "ReqDate";
$dg->autoExpandColumn = "details";
$dg->emptyTextOfHiddenColumns = true;
$col = $dg->addColumn("عملیات", "");
$col->sortable = false;
$col->renderer = "function(v,p,r){return TrafficReq.OperationRender(v,p,r);}";
$col->width = 50;
$grid = $dg->makeGrid_returnObjects();
?>
<center>
<form id="mainForm">
示例13:
require_once '../header.inc.php';
require_once inc_dataGrid;
//................ GET ACCESS .....................
$accessObj = FRW_access::GetAccess($_POST["MenuID"]);
//...................................................
$dg = new sadaf_datagrid("dg", $js_prefix_address . "templates.data.php?task=SelectTemplates", "div_dg");
$dg->addColumn("شماره الگو", "TemplateID");
$dg->addColumn("عنوان", "TemplateTitle");
if ($accessObj->RemoveFlag) {
$col = $dg->addColumn("حذف", "TemplateID");
$col->sortable = false;
$col->renderer = "function(v,p,r){return Templates.OperationRender(v,p,r);}";
$col->width = 40;
}
if ($accessObj->AddFlag) {
$dg->addButton("", "ایجاد الگوی جدید", "add", "function(){TemplatesObject.ShowNewTemplateForm();}");
$dg->addButton("", "کپی الگو", "copy", "function(){TemplatesObject.copyTemplate();}");
}
$dg->title = "لیست الگوهای قرارداد";
$dg->DefaultSortField = "TemplateID";
$dg->emptyTextOfHiddenColumns = true;
$dg->DefaultSortDir = "desc";
$dg->autoExpandColumn = "TemplateTitle";
$dg->width = 780;
$dg->height = 400;
$dg->pageSize = 15;
$grid = $dg->makeGrid_returnObjects();
?>
<script>
Templates.prototype = {
示例14: MiladiToShamsi
$col = $dg->addColumn('نوع فرم', "FormName", "string");
$col = $dg->addColumn('تاریخ ایجاد', "regDate", "string");
$col->renderer = "function(v){return MiladiToShamsi(v);}";
$col->width = 50;
$dg->addColumn('', "reference", "string", true);
$col = $dg->addColumn('آیتم وابسته', "referenceID", "string");
$col->renderer = "referenceRender";
$col = $dg->addColumn('وضعیت', "StepTitle", "string");
$dg->addColumn('', "StepID", "string", true);
//---------------------------
$col = $dg->addColumn("عملیات", "", "");
$col->renderer = "operationRender";
$col->sortable = false;
$col->width = 30;
//---------------------------
$dg->addButton("Add", "ایجاد", "add", "AddingAction");
$dg->height = 400;
$dg->title = "فرم های ایجاد شده";
$dg->width = 700;
$dg->DefaultSortField = "regDate";
$dg->DefaultSortDir = "asc";
$dg->makeGrid();
//.....................................................
$drp_forms = FormGenerator::Drp_AllForms("FormsList", "---", "changeForm");
//.....................................................
?>
<script type="text/javascript">
var forms_EXTData = <?php
echo common_component::PHPArray_to_JSArray(dataAccess::RUNQUERY("select * from fm_forms order by FormName"), "FormName", "FormID", "reference");
?>
;
示例15:
$dg->DefaultSortDir = "ASC";
$grid = $dg->makeGrid_returnObjects();
//..............................................................................
$dg = new sadaf_datagrid("dg", $js_prefix_address . "saving.data.php?task=GetRulePeriods", "grid_div");
$dg->addColumn("", "RuleID", "", true);
$dg->addColumn("", "RowID", "", true);
$col = $dg->addColumn("تعداد ماه دوره", "months");
$col->editor = ColumnEditor::NumberField();
$col->align = "center";
$col = $dg->addColumn("تعداد اقساط", "InstallmentCount");
$col->editor = ColumnEditor::NumberField();
$col->align = "center";
if ($accessObj->AddFlag) {
$dg->enableRowEdit = true;
$dg->rowEditOkHandler = "function(store,record){return SavingRuleObject.SavePeriod(record);}";
$dg->addButton("AddBtn", "ایجاد", "add", "function(){SavingRuleObject.AddPeriod();}");
}
if ($accessObj->RemoveFlag) {
$col = $dg->addColumn("حذف", "");
$col->sortable = false;
$col->renderer = "SavingRule.PeriodDeleteRender";
$col->width = 35;
}
$dg->emptyTextOfHiddenColumns = true;
$dg->height = 300;
$dg->width = 300;
$dg->EnableSearch = false;
$dg->EnablePaging = false;
$dg->DefaultSortField = "months";
$dg->DefaultSortDir = "ASC";
$grid2 = $dg->makeGrid_returnObjects();