Exemplo n.º 1
0
        public static bool FillData_DepartmentNames(OutputDocument oOutputDocument, DateTime?dDateBeg, DateTime?dDateEnd)
        {
            if (oOutputDocument == null)
            {
                return(false);
            }

            if (!dDateBeg.HasValue)
            {
                dDateBeg = DateTime.Now;
            }
            if (!dDateEnd.HasValue)
            {
                dDateEnd = DateTime.Now;
            }

            RFMCursorWait.Set(true);
            if (!oOutputDocument.FillTableDepartmentNames(dDateBeg, dDateEnd) ||
                oOutputDocument.ErrorNumber != 0 ||
                oOutputDocument.TableDepartmentNames == null)
            {
                RFMCursorWait.Set(false);
                RFMMessage.MessageBoxError("Ошибка при получении данных (отделы)...");
                return(false);
            }
            RFMCursorWait.Set(false);
            if (oOutputDocument.TableDepartmentNames.Rows.Count == 0)
            {
                RFMMessage.MessageBoxError("Нет данных (отделы)...");
                return(false);
            }
            return(true);
        }