понедельник, 22 июля 2013 г.

Разное

Передача параметров в вызываемую форму:
http://axforum.info/forums/showthread.php?t=30177
http://www.axaptapedia.com/Passing_values_between_forms

Фильтрация на форме:
http://dynamics-ax-live.blogspot.ru/2010/03/how-to-filter-records-in-form-by-code.html

Раскраска грида:
http://daxguy.blogspot.ru/2007/04/coloring-grids-in-dax.html

Деактивация контрола (на active датасорса):
    Control.enabled(true);
    select count(RecId) from cSST where cSST.Row == Table_ds.cursor().getFieldValue("RecId");
    if(cSST.RecId <= 1) Control.enabled(false);

DateTime2Real:
public real DT2Real(utcDateTime _dt)
{
    str qwe;
    int wer;
    real ert;  
   
       qwe = DateTimeUtil::toStr(_dt);  
       qwe = strRem(qwe,"T");
       qwe = strRem(qwe,"-");
       qwe = strRem(qwe,":");
       wer = str2int(qwe);
       ert = wer/10000;    
       return ert;
}

Date2UTCDateTime:
public utcDateTime convertDToUtcDT(date simpleDate)
{
int timeOfDay;
UTCDateTime datetime;
;
timeOfDay = str2time('00:00:00');
datetime = DateTimeUtil::newDateTime(simpleDate, timeOfDay);
return datetime;
}