local m_pGantt = CLuaGantUtil();
m_pGantt:SetGant(ui:getDialogName(), 'id_gantt');
local bOK = false;
bOK = m_pGantt:setDateRange("2016-03-11", "2016-05-24");
local help = CSelectHelp();
if db:select('SELECT top(5) eqpt_id,eqpt_name from bs_eqpt','',helpEqpt) < 0 then
ui:msg(db:error());
return;
end
bOK = m_pGantt:setListHelp(help, "eqpt_id", "eqpt_name");
local tm = CTNCalcWorkTime();
local str = CTNString();
local err;
bOK = tm:loadShift(str);
bOK = tm:loadWO(str);
tm:calcOut("2016-03-11", "2016-05-24", help);
bOK = m_pGantt:setWorkTime(help);
bOK = m_pGantt:addTask("taskID", "显示名称", 'eqptID',
"2016-03-14 10:15:00", "2016-03-15 04:15:00", 34145, 56324);
bOK = getTask('taskID', help);
local size = getAllTask(help);
bOK = setTaskBackColor('taskID', rgb(100,100,0));
bOK = delTask('taskID');
bOK = delAllTask();
bOK = delWorkTime('eqptID', '2016-05-02');
bOK = delAllWorkTime();
bOK = delAllEqpt();
bOK = delAll();