Проектирование CRM-системы ОАО "Орбита-Сервис"

Разработка информационной подсистемы автоматизации рабочего места менеджера салона по ремонту мобильных телефонов. Проблемы CRM-систем, необходимость их использования. Система управления базой данных как способ реализации информационной системы.

Рубрика Программирование, компьютеры и кибернетика
Вид дипломная работа
Язык русский
Дата добавления 28.11.2012
Размер файла 1,4 M

Отправить свою хорошую работу в базу знаний просто. Используйте форму, расположенную ниже

Студенты, аспиранты, молодые ученые, использующие базу знаний в своей учебе и работе, будут вам очень благодарны.

quCount. Close;

// Подсчет количества телефонов ожидание деталеё

quCount. SQL. Text: = ('SELECT COUNT (R_STATUS) FROM ORBITAS, STATUS WHERE (ORBITAS. R_STATUS=3) AND (STATUS. ID=ORBITAS. R_STATUS) ' +'AND'+' (ORBITAS. R_ENGINEER='+ID+') ');

quCount. Open;

Label4. Caption: ='Ожидание деталей: '+quCount. Fields [0]. AsString;

// // // // // quCount. ExecSQL;

quCount. Close;

quCount. Free;

LoadInfoSettings;

// GridInfoWidth;

end;

end.

unit Unit6;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons, ExtCtrls;

type

TFPassword = class (TForm)

Panel1: TPanel;

ELogin: TLabeledEdit;

EPass: TLabeledEdit;

BitBtn1: TBitBtn;

BitBtn2: TBitBtn;

procedure BitBtn1Click (Sender: TObject);

procedure BitBtn2Click (Sender: TObject);

procedure FormCloseQuery (Sender: TObject; var CanClose: Boolean);

procedure FormClose (Sender: TObject; var Action: TCloseAction);

private

{ Private declarations }

public

{ Public declarations }

protected

procedure WMGetSysCommand (var Message: TMessage); message WM_SYSCOMMAND;

end;

var

FPassword: TFPassword;

Login: Boolean=False;

implementation

uses Unit1;

{$R *. dfm}

procedure TFPassword. WMGetSysCommand (var Message: TMessage);

begin

if (Message. wParam = SC_Close)

then Application. Terminate

else Inherited;

end;

procedure TFPassword. BitBtn1Click (Sender: TObject);

begin

if (ELogin. Text='gsm') and ( (EPass. Text='genetika') or (EPass. Text='4321')) then

begin

Login: =True;

end

else

begin

Application. MessageBox ('Неверно введены имя пользователя или пароль','Ошибка',MB_OK + MB_ICONERROR);

end;

end;

procedure TFPassword. BitBtn2Click (Sender: TObject);

begin

Login: =True;

FPassword. Close;

end;

procedure TFPassword. FormCloseQuery (Sender: TObject;

var CanClose: Boolean);

begin

if Login then CanClose: =True else

CanClose: =False;

end;

procedure TFPassword. FormClose (Sender: TObject; var Action: TCloseAction);

begin

{Login: =True;

FPassword. Close; }

end;

end.

unit Unit7;

interface

uses Windows, SysUtils, Classes, Graphics, Forms, Controls, StdCtrls,

Buttons, ExtCtrls,ShellApi;

type

TAboutBox = class (TForm)

Panel1: TPanel;

ProgramIcon: TImage;

ProductName: TLabel;

Version: TLabel;

Copyright: TLabel;

Comments: TLabel;

OKButton: TButton;

Label1: TLabel;

procedure CommentsClick (Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

AboutBox: TAboutBox;

implementation

uses Unit1;

{$R *. dfm}

procedure TAboutBox.commentsClick (Sender: TObject);

begin

ShellExecute (AboutBox. Handle, 'open', 'mailto: YPSoft@inbox.ru', nil, nil, SW_SHOWNORMAL);

end;

end.

unit Unit8;

interface

uses

Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,

Dialogs, StdCtrls, Buttons, ExtCtrls, IniFiles;

type

TFSettings = class (TForm)

Panel1: TPanel;

GroupBox1: TGroupBox;

CheckBox1: TCheckBox;

CheckBox2: TCheckBox;

CheckBox3: TCheckBox;

CheckBox5: TCheckBox;

CheckBox6: TCheckBox;

CheckBox7: TCheckBox;

CheckBox8: TCheckBox;

CheckBox9: TCheckBox;

CheckBox10: TCheckBox;

CheckBox11: TCheckBox;

BitBtn1: TBitBtn;

procedure CheckBox1Click (Sender: TObject);

procedure CheckBox2Click (Sender: TObject);

procedure CheckBox7Click (Sender: TObject);

procedure CheckBox8Click (Sender: TObject);

procedure CheckBox10Click (Sender: TObject);

procedure CheckBox11Click (Sender: TObject);

procedure CheckBox9Click (Sender: TObject);

procedure CheckBox5Click (Sender: TObject);

procedure CheckBox3Click (Sender: TObject);

procedure CheckBox6Click (Sender: TObject);

procedure ButtonsVisibleSave;

procedure ButtonsVisibleLoad;

procedure CheckBoxLoad;

procedure FormClose (Sender: TObject; var Action: TCloseAction);

procedure FormCreate (Sender: TObject);

procedure BitBtn1Click (Sender: TObject);

private

{ Private declarations }

public

{ Public declarations }

end;

var

FSettings: TFSettings;

implementation

uses Unit1;

{$R *. dfm}

procedure TFSettings. ButtonsVisibleSave;

// Запоминание показываемых кнопок

var

ConfFile: TIniFile;

begin

ConfFile: =TIniFile. Create (ExtractFilePath (Application. ExeName) +'DBconfig. ini');

ConfFile. WriteBool ('ToolBatSet','TBADD',FMain. TBAdd. Visible);

ConfFile. WriteBool ('ToolBatSet','TBEdit',FMain. TBEdit. Visible);

ConfFile. WriteBool ('ToolBatSet','TBDelete',FMain. TBDelete. Visible);

ConfFile. WriteBool ('ToolBatSet','TBRefresh',FMain. TBRefresh. Visible);

ConfFile. WriteBool ('ToolBatSet','TBSeach',FMain. TBSeach. Visible);

ConfFile. WriteBool ('ToolBatSet','TBPrint',FMain. TBPrint. Visible);

ConfFile. WriteBool ('ToolBatSet','TBIngeneer',FMain. TBIngeneer. Visible);

ConfFile. WriteBool ('ToolBatSet','TBChoose',FMain. TBChoose. Visible);

ConfFile. WriteBool ('ToolBatSet','TBSort',FMain. TBSort. Visible);

ConfFile. WriteBool ('ToolBatSet','ToolButton1',FMain. ToolButton1. Visible);

ConfFile. WriteBool ('ToolBatSet','ToolButton2',FMain. ToolButton2. Visible);

ConfFile. Free;

end;

procedure TFSettings. ButtonsVisibleLoad;

// Загрузка показываемых кнопок

var

ConfFile: TIniFile;

begin

ConfFile: =TIniFile. Create (ExtractFilePath (Application. ExeName) +'DBconfig. ini');

FMain. TBAdd. Visible: =ConfFile. ReadBool ('ToolBatSet','TBADD',FMain. TBAdd. Visible);

FMain. TBEdit. Visible: =ConfFile. ReadBool ('ToolBatSet','TBEdit',FMain. TBEdit. Visible);

FMain. TBDelete. Visible: =ConfFile. ReadBool ('ToolBatSet','TBDelete',FMain. TBDelete. Visible);

FMain. TBRefresh. Visible: =ConfFile. ReadBool ('ToolBatSet','TBRefresh',FMain. TBRefresh. Visible);

FMain. TBSeach. Visible: =ConfFile. ReadBool ('ToolBatSet','TBSeach',FMain. TBSeach. Visible);

FMain. TBPrint. Visible: =ConfFile. ReadBool ('ToolBatSet','TBPrint',FMain. TBPrint. Visible);

FMain. TBIngeneer. Visible: =ConfFile. ReadBool ('ToolBatSet','TBIngeneer',FMain. TBIngeneer. Visible);

FMain. TBChoose. Visible: =ConfFile. ReadBool ('ToolBatSet','TBChoose',FMain. TBChoose. Visible);

FMain. TBSort. Visible: =ConfFile. ReadBool ('ToolBatSet','TBSort',FMain. TBSort. Visible);

FMain. ToolButton1. Visible: =ConfFile. ReadBool ('ToolBatSet','ToolButton1',FMain. ToolButton1. Visible);

FMain. ToolButton2. Visible: =ConfFile. ReadBool ('ToolBatSet','ToolButton2',FMain. ToolButton2. Visible);

ConfFile. Free;

end;

procedure TFSettings. CheckBoxLoad;

// Загрузка галочек для кнопок

var

ConfFile: TIniFile;

begin

ConfFile: =TIniFile. Create (ExtractFilePath (Application. ExeName) +'DBconfig. ini');

FSettings. CheckBox1. Checked: =ConfFile. ReadBool ('ToolBatSet','TBADD',FSettings. CheckBox1. Checked);

FSettings. CheckBox10. Checked: =ConfFile. ReadBool ('ToolBatSet','TBSeach',FSettings. CheckBox10. Checked);

FSettings. CheckBox11. Checked: =ConfFile. ReadBool ('ToolBatSet','TBPrint',FSettings. CheckBox11. Checked);

FSettings. CheckBox2. Checked: =ConfFile. ReadBool ('ToolBatSet','TBEdit',FSettings. CheckBox2. Checked);

FSettings. CheckBox3. Checked: =ConfFile. ReadBool ('ToolBatSet','TBSort',FSettings. CheckBox3. Checked);

FSettings. CheckBox5. Checked: =ConfFile. ReadBool ('ToolBatSet','TBChoose',FSettings. CheckBox5. Checked);

FSettings. CheckBox6. Checked: =ConfFile. ReadBool ('ToolBatSet','ToolButton1',FSettings. CheckBox6. Checked);

FSettings. CheckBox7. Checked: =ConfFile. ReadBool ('ToolBatSet','TBDelete',FSettings. CheckBox7. Checked);

FSettings. CheckBox8. Checked: =ConfFile. ReadBool ('ToolBatSet','TBRefresh',FSettings. CheckBox8. Checked);

FSettings. CheckBox9. Checked: =ConfFile. ReadBool ('ToolBatSet','TBIngeneer',FSettings. CheckBox9. Checked);

ConfFile. Free;

end;

procedure TFSettings. CheckBox1Click (Sender: TObject);

begin

if CheckBox1. Checked then FMain. TBAdd. Visible: =True

else FMain. TBAdd. Visible: =False;

end;

procedure TFSettings. CheckBox2Click (Sender: TObject);

begin

if CheckBox2. Checked then FMain. TBEdit. Visible: =True

else FMain. TBEdit. Visible: =False;

end;

procedure TFSettings. CheckBox7Click (Sender: TObject);

begin

if CheckBox7. Checked then FMain. TBDelete. Visible: =True

else FMain. TBDelete. Visible: =False;

end;

procedure TFSettings. CheckBox8Click (Sender: TObject);

begin

if CheckBox8. Checked then FMain. TBRefresh. Visible: =True

else FMain. TBRefresh. Visible: =False;

end;

procedure TFSettings. CheckBox10Click (Sender: TObject);

begin

if CheckBox10. Checked then FMain. TBSeach. Visible: =True

else FMain. TBSeach. Visible: =False;

end;

procedure TFSettings. CheckBox11Click (Sender: TObject);

begin

if CheckBox11. Checked then FMain. TBPrint. Visible: =True

else FMain. TBPrint. Visible: =False;

end;

procedure TFSettings. CheckBox9Click (Sender: TObject);

begin

if CheckBox9. Checked then FMain. TBIngeneer. Visible: =True

else FMain. TBIngeneer. Visible: =False;

end;

procedure TFSettings. CheckBox5Click (Sender: TObject);

begin

if CheckBox5. Checked then FMain. TBChoose. Visible: =True

else FMain. TBChoose. Visible: =False;

end;

procedure TFSettings. CheckBox3Click (Sender: TObject);

begin

if CheckBox3. Checked then FMain. TBSort. Visible: =True

else FMain. TBSort. Visible: =False;

end;

procedure TFSettings. CheckBox6Click (Sender: TObject);

begin

if CheckBox6. Checked then

begin

FMain. ToolButton1. Visible: =True;

FMain. ToolButton2. Visible: =True;

end

else

begin

FMain. ToolButton1. Visible: =False;

FMain. ToolButton2. Visible: =False;

end;

end;

procedure TFSettings. FormClose (Sender: TObject; var Action: TCloseAction);

begin

ButtonsVisibleSave;

end;

procedure TFSettings. FormCreate (Sender: TObject);

begin

CheckBoxLoad;

end;

procedure TFSettings. BitBtn1Click (Sender: TObject);

begin

Close;

end;

end.

unit UComboBox;

interface

uses

StdCtrls, DB;

type

PIDComboBox = object {блок данных для любого ComboBox}

id: integer; {id в таблице}

end;

// Загружает данные в ComboBox с привязанными к ним ID

function LoadIDComboBox (CB: TComboBox; DS: TDataSet; IDField, TextField: shortstring): boolean; overload;

// Загружает данные в ComboBox с привязанными к ним ID,

// устанавливает текущее значение по указанному уникальному номеру

function LoadIDComboBox (CB: TComboBox; DS: TDataSet; IDField, TextField: shortstring; SelectID: integer): boolean; overload;

// Возвращает ID соответствующий выбранным данным в ComboBox

function GetIDComboBox (CB: TComboBox): integer;

// Устанавливает фокус на сроку с соответствующим ID

function SelectFromID (CB: TComboBox; SelectID: integer): boolean;

implementation

function LoadIDComboBox (CB: TComboBox; DS: TDataSet; IDField, TextField: shortstring): boolean;

var

IDCB: PIDComboBox;

begin

// Заполнение полей ComboBox-ов

try

CB. Items. Clear;

DS. First;

while not DS. EOF do begin

IDCB. id: = DS [IDField];

// Добавляем строку с привязанным объектом

CB. Items. AddObject (DS [TextField], TObject (IDCB));

DS. Next;

end;

Result: = True;

except

Result: = False;

end;

end;

function LoadIDComboBox (CB: TComboBox; DS: TDataSet; IDField, TextField: shortstring; SelectID: integer): boolean;

var

IDCB: PIDComboBox;

Index: integer;

begin

// Заполнение полей ComboBox-ов

try

CB. Items. Clear;

DS. First;

while not DS. EOF do begin

IDCB. id: = DS [IDField];

// Добавляем строку с привязанным объектом

Index: = CB. Items. AddObject (DS [TextField], TObject (IDCB));

// Выделяем указанный элемент

if SelectID = IDCB. id then CB. ItemIndex: = Index;

DS. Next;

end;

Result: = True;

except

Result: = False;

end;

end;

function GetIDComboBox (CB: TComboBox): integer;

begin

// Возвращает ID соответствующий выбранным данным в ComboBox

try

if CB. Items. Objects [CB. ItemIndex] = nil then

Result: = - 1

else

Result: = PIDComboBox (CB. Items. Objects [CB. ItemIndex]). id;

except

Result: = - 1;

end;

end;

function SelectFromID (CB: TComboBox; SelectID: integer): boolean;

var

i: Integer;

begin

// Выделяем указанный элемент

try

for i: = 0 to CB. Items. Count - 1 do

if PIDComboBox (CB. Items. Objects [i]). id = SelectID then

begin

CB. ItemIndex: = i;

Result: = True;

Exit;

end;

Result: = False;

except

Result: = False;

end;

end;

end.

Размещено на Allbest.ru


Подобные документы

Работы в архивах красиво оформлены согласно требованиям ВУЗов и содержат рисунки, диаграммы, формулы и т.д.
PPT, PPTX и PDF-файлы представлены только в архивах.
Рекомендуем скачать работу.