ТМС:Менеджер — различия между версиями
Материал из wiki.standart-n.ru
Vlasova (обсуждение | вклад) |
Vlasova (обсуждение | вклад) |
||
Строка 55: | Строка 55: | ||
'''procedure SaveEncryptedSettings;''' | '''procedure SaveEncryptedSettings;''' | ||
+ | |||
'''function Autorisation: boolean;''' | '''function Autorisation: boolean;''' | ||
+ | |||
'''procedure LogIt(s: string);''' | '''procedure LogIt(s: string);''' | ||
+ | |||
'''procedure LogException(s: string);''' | '''procedure LogException(s: string);''' | ||
+ | |||
'''procedure Display(s: string);''' | '''procedure Display(s: string);''' | ||
+ | |||
'''function startsession(user_id: int64; forcecreate: boolean; var ws_name: string): boolean;''' | '''function startsession(user_id: int64; forcecreate: boolean; var ws_name: string): boolean;''' | ||
+ | |||
'''procedure endsession(CLOSESESSION_ID: int64 = 0; ENDFLAG: integer = 0; DOEVENT: boolean = false);''' | '''procedure endsession(CLOSESESSION_ID: int64 = 0; ENDFLAG: integer = 0; DOEVENT: boolean = false);''' | ||
+ | |||
'''procedure SetDBVER;''' | '''procedure SetDBVER;''' | ||
+ | |||
'''function NewWinBtn(caption: string; icon: TIcon): TSpeedButton;''' | '''function NewWinBtn(caption: string; icon: TIcon): TSpeedButton;''' | ||
+ | |||
'''procedure initimagelist;''' | '''procedure initimagelist;''' | ||
+ | |||
'''procedure SaveUserDataFile;''' | '''procedure SaveUserDataFile;''' | ||
+ | |||
'''procedure SaveSettings;''' | '''procedure SaveSettings;''' | ||
+ | |||
'''procedure SaveMngrWindowsSettings;''' | '''procedure SaveMngrWindowsSettings;''' | ||
+ | |||
'''procedure gbKeyPress(Key: Char; ed: TEdit; DoDigits: boolean = False);''' | '''procedure gbKeyPress(Key: Char; ed: TEdit; DoDigits: boolean = False);''' | ||
+ | |||
'''function SessionByID(id: int64): rSession;''' | '''function SessionByID(id: int64): rSession;''' | ||
+ | |||
'''function SessionID: int64;''' | '''function SessionID: int64;''' | ||
+ | |||
'''function GetCustomDrawText(sField: string; AText: string): string;''' | '''function GetCustomDrawText(sField: string; AText: string): string;''' | ||
+ | |||
'''function DelFromGroup(CurMembership: TCurMembership): boolean;''' | '''function DelFromGroup(CurMembership: TCurMembership): boolean;''' | ||
+ | |||
'''function CheckMembership(grouptablename: string; table_id: int64; checkgroup_ids: string): boolean;''' | '''function CheckMembership(grouptablename: string; table_id: int64; checkgroup_ids: string): boolean;''' | ||
+ | |||
'''procedure ShowPartHistory(part_id: int64; ScreenRect, MaxRect: TRect);''' | '''procedure ShowPartHistory(part_id: int64; ScreenRect, MaxRect: TRect);''' | ||
+ | |||
'''procedure InitGridParamView(gb: TCustomdxDBTreeListControl; gbName: string; filename: string; LoadAllRecordsMode: integer = 0);''' | '''procedure InitGridParamView(gb: TCustomdxDBTreeListControl; gbName: string; filename: string; LoadAllRecordsMode: integer = 0);''' | ||
+ | |||
'''procedure gbCtrl(edcfSelect: TcfSelectEdit; Key: Word; Shift: TShiftState);''' | '''procedure gbCtrl(edcfSelect: TcfSelectEdit; Key: Word; Shift: TShiftState);''' | ||
+ | |||
'''procedure CancelgbCtrl(gb: TWinControl);''' | '''procedure CancelgbCtrl(gb: TWinControl);''' | ||
+ | |||
'''function IsAdmin: boolean;''' | '''function IsAdmin: boolean;''' | ||
+ | |||
'''function IsManager: boolean;''' | '''function IsManager: boolean;''' | ||
+ | |||
'''procedure DoDates(ANode: TdxTreeListNode; fieldname: string; var AText: string; var AColor: TColor; AFont: TFont);''' | '''procedure DoDates(ANode: TdxTreeListNode; fieldname: string; var AText: string; var AColor: TColor; AFont: TFont);''' | ||
+ | |||
'''procedure CheckSession;''' | '''procedure CheckSession;''' | ||
+ | |||
'''function GetCash: double;''' | '''function GetCash: double;''' | ||
+ | |||
'''procedure CompleteCurParams(filename: string);''' | '''procedure CompleteCurParams(filename: string);''' | ||
+ | |||
'''function GetDocFrameById(id: int64): TFrameCustomDoc;''' | '''function GetDocFrameById(id: int64): TFrameCustomDoc;''' | ||
+ | |||
'''procedure DrawImage_Folder(il: TImageList; ImageIndex: integer; AText: string; ACanvas: TCanvas; ARect: TRect; AColor: TColor; AFont: TFont);''' | '''procedure DrawImage_Folder(il: TImageList; ImageIndex: integer; AText: string; ACanvas: TCanvas; ARect: TRect; AColor: TColor; AFont: TFont);''' | ||
+ | |||
'''procedure ToolButtonDropDownMenuClick(btn: TToolButton);''' | '''procedure ToolButtonDropDownMenuClick(btn: TToolButton);''' | ||
+ | |||
'''procedure ExecScript(group_id: int64; program_data: TStringList = nil); overload;''' | '''procedure ExecScript(group_id: int64; program_data: TStringList = nil); overload;''' | ||
+ | |||
'''procedure ExecScript(group_id: int64; program_data: TStringList; Sender: TObject); overload;''' | '''procedure ExecScript(group_id: int64; program_data: TStringList; Sender: TObject); overload;''' | ||
+ | |||
'''procedure ExecScript(PartGroup: TPartGroup; program_data: TStringList; Sender: TObject); overload;''' | '''procedure ExecScript(PartGroup: TPartGroup; program_data: TStringList; Sender: TObject); overload;''' | ||
+ | |||
'''procedure ExecScript(group_sid: string; program_data: TStringList; Sender: TObject); overload;''' | '''procedure ExecScript(group_sid: string; program_data: TStringList; Sender: TObject); overload;''' | ||
+ | |||
'''procedure InitScriptsMenu(MenuItems: TMenuItem);''' | '''procedure InitScriptsMenu(MenuItems: TMenuItem);''' | ||
+ | |||
'''function InitScripts_AddChilds_recur(ParentMI: TMenuItem): boolean;''' | '''function InitScripts_AddChilds_recur(ParentMI: TMenuItem): boolean;''' | ||
+ | |||
'''procedure UpdKritK(name_id: string; value: integer);''' | '''procedure UpdKritK(name_id: string; value: integer);''' | ||
+ | |||
'''function EditImageList(id: integer): boolean;''' | '''function EditImageList(id: integer): boolean;''' | ||
+ | |||
'''procedure SetInitParams;''' | '''procedure SetInitParams;''' | ||
+ | |||
'''function InitScales: boolean;''' | '''function InitScales: boolean;''' | ||
+ | |||
'''function InitMgnCustomDicts: boolean;''' | '''function InitMgnCustomDicts: boolean;''' | ||
+ | |||
'''procedure InitDataSet(var IBQuery:TIBQuery);''' | '''procedure InitDataSet(var IBQuery:TIBQuery);''' | ||
+ | |||
'''function GetStringFromClipboard: WideString;''' | '''function GetStringFromClipboard: WideString;''' | ||
+ | |||
'''procedure RefreshGrid(Grid: TdxDBGrid; UniqueField: String);''' | '''procedure RefreshGrid(Grid: TdxDBGrid; UniqueField: String);''' | ||
+ | |||
'''procedure CustomParamsInit;''' | '''procedure CustomParamsInit;''' | ||
+ | |||
'''procedure CustomDictsInit;''' | '''procedure CustomDictsInit;''' | ||
+ | |||
'''procedure ShowSplash;''' | '''procedure ShowSplash;''' | ||
+ | |||
'''procedure InitPrinters;''' | '''procedure InitPrinters;''' | ||
+ | |||
'''function PrepareForFind(s: string): string;''' | '''function PrepareForFind(s: string): string;''' | ||
+ | |||
'''function IsDigit(s: char): boolean;''' | '''function IsDigit(s: char): boolean;''' | ||
+ | |||
'''function RemoveLeft(s, val: string): string;''' | '''function RemoveLeft(s, val: string): string;''' | ||
+ | |||
'''function RemoveRight(s, val: string): string;''' | '''function RemoveRight(s, val: string): string;''' | ||
+ | |||
'''function IsReg: boolean;''' | '''function IsReg: boolean;''' | ||
+ | |||
'''function ConvertFSelect(svalue: string): string;''' | '''function ConvertFSelect(svalue: string): string;''' | ||
+ | |||
'''procedure bLocate(qD: TIBQuery; UniqueField: String; id: Variant);''' | '''procedure bLocate(qD: TIBQuery; UniqueField: String; id: Variant);''' | ||
+ | |||
'''function CreatePreviewFile(pict_id: int64): boolean;''' | '''function CreatePreviewFile(pict_id: int64): boolean;''' | ||
+ | |||
'''procedure UpdateUserMMBSH;''' | '''procedure UpdateUserMMBSH;''' | ||
+ | |||
'''function GetGoodNameID(sname: string): int64;''' | '''function GetGoodNameID(sname: string): int64;''' | ||
+ | |||
'''function UserParamsByID(UserID: integer): TcfZip;''' | '''function UserParamsByID(UserID: integer): TcfZip;''' | ||
+ | |||
'''function CopyGridParams(gb: TCustomdxDBTreeListControl; gbName, gbFileName: String; LoadAll: integer = 0): boolean;''' | '''function CopyGridParams(gb: TCustomdxDBTreeListControl; gbName, gbFileName: String; LoadAll: integer = 0): boolean;''' | ||
+ | |||
'''function GetGoodName(svalue: string): string;''' | '''function GetGoodName(svalue: string): string;''' | ||
+ | |||
'''procedure CheckFields;''' | '''procedure CheckFields;''' | ||
+ | |||
'''procedure InitDocArchiveView;''' | '''procedure InitDocArchiveView;''' | ||
+ | |||
'''procedure CreateTrayIcon(n: Integer);''' | '''procedure CreateTrayIcon(n: Integer);''' | ||
+ | |||
'''procedure DeleteTrayIcon(n: Integer);''' | '''procedure DeleteTrayIcon(n: Integer);''' | ||
+ | |||
'''procedure IconRepaint(index: integer; cp: string);''' | '''procedure IconRepaint(index: integer; cp: string);''' | ||
+ | |||
'''function GetTmsParams: String;''' | '''function GetTmsParams: String;''' | ||
+ | |||
'''procedure CheckIndices;''' | '''procedure CheckIndices;''' | ||
+ | |||
'''Procedure FillPartAttributes;''' | '''Procedure FillPartAttributes;''' | ||
+ | |||
'''procedure FreeEvent(id: string = '');''' | '''procedure FreeEvent(id: string = '');''' | ||
+ | |||
'''procedure RefreshMacroParams;''' | '''procedure RefreshMacroParams;''' | ||
Версия 17:22, 6 апреля 2015
USES
unFrameCustomDict
unMain
undm
function InitMGN: boolean; Инициализация глобального справочника
function ExtractFileNameWithoutExt(const FileName: string): string; Возвращает имя файла без расширений и каталога
procedure LoadSettings; Загрузка настроек пользователя из USERS поле DATA
procedure DoLocalSettings(bRead: boolean); Установка локальных параметров. Например, параметры подключения к интеллектуальной заявке, сведения о регистрации программы, параметры подключения к интернету и прочее.
procedure SendInfoM; Процедура собирает информацию о клиенте: параметры организации, имя компьютера, адрес организации о отправляет разработчикам.
procedure InitGDB; Инициализация подключения к базе Общего Заказа. PARAMS.PARAM_ID='GDB_CONNSTR'
procedure InitOzDb; Инициализация подключения к базе Общего Заказа. PARAMS.PARAM_ID='OZ_CONNSTR'
function GetFolder: string; Возвращает код выбранной группы (PARTS.FOLDERS). 0 - если не выбрано.
procedure SelectsCheck; Проверяет наличие всех необходимых режимов в SELECTS, если нет, то добавляет. Проверяемые коды: -14, -10, -11, -12, -13
function TempQuery(trn: TIBTransaction = nil; db: TIBDatabase = nil): TIBQuery; Возвращает созданный TIBQuery, подключенный к текущей базе данных.
function Init(var sMsg: string): boolean; Инициализация программы Менеджер
function InitAfter(var sMsg: string): boolean; Выполняет следующие шаги запуска менеджера: -Проверка набора системных запросов -Инициализация менеджера форм -Инициализация меню отчетов -Инициализация Внешних справочников -Инициализация клиента Интеллектуальной заявки -Инициализация подпрограмм -Инициализация фильтров архива документов -Инициализация SpacePro справочников -Инициализация принтеров -Инициализация основной подпрограммы TMS (-400) -Инициализация фрейма "Касса" -Инициализация фрейма "Комплекты" -Инициализация стилей -Проверка индексов -Загрузка настроек автонаценки
procedure SaveEncryptedSettings;
function Autorisation: boolean;
procedure LogIt(s: string);
procedure LogException(s: string);
procedure Display(s: string);
function startsession(user_id: int64; forcecreate: boolean; var ws_name: string): boolean;
procedure endsession(CLOSESESSION_ID: int64 = 0; ENDFLAG: integer = 0; DOEVENT: boolean = false);
procedure SetDBVER;
function NewWinBtn(caption: string; icon: TIcon): TSpeedButton;
procedure initimagelist;
procedure SaveUserDataFile;
procedure SaveSettings;
procedure SaveMngrWindowsSettings;
procedure gbKeyPress(Key: Char; ed: TEdit; DoDigits: boolean = False);
function SessionByID(id: int64): rSession;
function SessionID: int64;
function GetCustomDrawText(sField: string; AText: string): string;
function DelFromGroup(CurMembership: TCurMembership): boolean;
function CheckMembership(grouptablename: string; table_id: int64; checkgroup_ids: string): boolean;
procedure ShowPartHistory(part_id: int64; ScreenRect, MaxRect: TRect);
procedure InitGridParamView(gb: TCustomdxDBTreeListControl; gbName: string; filename: string; LoadAllRecordsMode: integer = 0);
procedure gbCtrl(edcfSelect: TcfSelectEdit; Key: Word; Shift: TShiftState);
procedure CancelgbCtrl(gb: TWinControl);
function IsAdmin: boolean;
function IsManager: boolean;
procedure DoDates(ANode: TdxTreeListNode; fieldname: string; var AText: string; var AColor: TColor; AFont: TFont);
procedure CheckSession;
function GetCash: double;
procedure CompleteCurParams(filename: string);
function GetDocFrameById(id: int64): TFrameCustomDoc;
procedure DrawImage_Folder(il: TImageList; ImageIndex: integer; AText: string; ACanvas: TCanvas; ARect: TRect; AColor: TColor; AFont: TFont);
procedure ToolButtonDropDownMenuClick(btn: TToolButton);
procedure ExecScript(group_id: int64; program_data: TStringList = nil); overload;
procedure ExecScript(group_id: int64; program_data: TStringList; Sender: TObject); overload;
procedure ExecScript(PartGroup: TPartGroup; program_data: TStringList; Sender: TObject); overload;
procedure ExecScript(group_sid: string; program_data: TStringList; Sender: TObject); overload;
procedure InitScriptsMenu(MenuItems: TMenuItem);
function InitScripts_AddChilds_recur(ParentMI: TMenuItem): boolean;
procedure UpdKritK(name_id: string; value: integer);
function EditImageList(id: integer): boolean;
procedure SetInitParams;
function InitScales: boolean;
function InitMgnCustomDicts: boolean;
procedure InitDataSet(var IBQuery:TIBQuery);
function GetStringFromClipboard: WideString;
procedure RefreshGrid(Grid: TdxDBGrid; UniqueField: String);
procedure CustomParamsInit;
procedure CustomDictsInit;
procedure ShowSplash;
procedure InitPrinters;
function PrepareForFind(s: string): string;
function IsDigit(s: char): boolean;
function RemoveLeft(s, val: string): string;
function RemoveRight(s, val: string): string;
function IsReg: boolean;
function ConvertFSelect(svalue: string): string;
procedure bLocate(qD: TIBQuery; UniqueField: String; id: Variant);
function CreatePreviewFile(pict_id: int64): boolean;
procedure UpdateUserMMBSH;
function GetGoodNameID(sname: string): int64;
function UserParamsByID(UserID: integer): TcfZip;
function CopyGridParams(gb: TCustomdxDBTreeListControl; gbName, gbFileName: String; LoadAll: integer = 0): boolean;
function GetGoodName(svalue: string): string;
procedure CheckFields;
procedure InitDocArchiveView;
procedure CreateTrayIcon(n: Integer);
procedure DeleteTrayIcon(n: Integer);
procedure IconRepaint(index: integer; cp: string);
function GetTmsParams: String;
procedure CheckIndices;
Procedure FillPartAttributes;
procedure FreeEvent(id: string = );
procedure RefreshMacroParams;