Показать сообщение отдельно
Старый 05.10.2018, 16:40   #11  
Ivanhoe is offline
Ivanhoe
Участник
Аватар для Ivanhoe
Лучший по профессии 2017
Лучший по профессии 2015
Лучший по профессии 2014
Лучший по профессии AXAWARD 2013
Лучший по профессии 2011
 
4,143 / 2155 (80) +++++++++
Регистрация: 29.09.2005
Адрес: Санкт-Петербург
У меня метод один:
X++:
/// <summary>
    /// This method is used to specify conditions on total number of hours while setting up the configuration for timesheet line workflow.
    /// </summary>
    /// <param name="_companyId">
    /// Present Company Id supplied by framework.
    /// </param>
    /// <param name="_tableId">
    /// Table Id supplied by framework.
    /// </param>
    /// <param name="_recId">
    /// Record Id of the timesheetline for which total number of hours is required.
    /// </param>
    /// <returns>
    /// Total number of hours in the timesheet line.
    /// </returns>
    public TSHoursTotal parmTotalWeekHours(
        CompanyId _companyId,
        TableId   _tableId,
        RecId     _recId)
    {
        TSHoursTotal    tsHoursTotal;
        TSTimesheetLine tsTimesheetLine = TSTimesheetLine::findRecId(_recId);

        if (tsTimesheetLine.RecId != 0)
        {
            tsHoursTotal = tsTimesheetLine.totalWeekHours();
        }
        else
        {
            throw error(strFmt("@SYS113080", _recId, tableId2name(_tableId)));
        }

        return tsHoursTotal;
    }
__________________
Ivanhoe as is..