Внедрение разработанного программного комплекса позволит сотрудникам отдела автоматизировать процессы, звязанные с учетом и обработкой строительных документов, что приведет к значительному сокращению трудозатрат и уменьшению вероятности ошибок.

В будущем возможна модернизация и расширение программного комплекса. Например, при внедрении его в администрациях всех районов, базу данных целесообразно реализовать на промышленной СУБД типа Oracle или MS SQLServer. В этом случае можно будет организовать один сервер базы данных, к которому будут подключаться все пользователи. Таким образом, будет реализовано централизованное хранилище документации в масштабе региона.

Приложение А (текст программных модулей)

Файл Program. cs

using System;

using System. Collections. Generic;

using System. Linq;

using System. Windows. Forms;

using System. Data;

using System. Data. OleDb;

using System. IO;

using System. Xml. Serialization;

namespace Realty

{

  static class Program

  {

  static public OleDbConnection accessConnection = null;

  static public User currentUser = new User();

  static public Settings settings;

  /// <summary>

  /// Главная точка входа для приложения.

  /// </summary>

  [STAThread]

  static void Main()

  {

  Application. EnableVisualStyles();

  Application. SetCompatibleTextRenderingDefault(false);

  LoginDialog loginDialog = new LoginDialog();

  if (loginDialog. ShowDialog() == DialogResult. OK)

НЕ нашли? Не то? Что вы ищете?

  {

  string _medName = currentUser. GetMediumName();

  if (_medName!= "") MessageBox. Show("Здравствуйте, " + currentUser. GetMediumName() + "!", "Приветствие");

  else MessageBox. Show("Здравствуйте, Администратор!", "Приветствие");

  loginDialog. Dispose();

  try

  {

  Stream _stream = new FileStream("settings. xml", FileMode. Open, FileAccess. Read);

  XmlSerializer _serializer = new XmlSerializer(typeof(Settings));

  settings = (Settings)_serializer. Deserialize(_stream);

  _stream. Close();

  _stream. Dispose();

  }

  catch (FileNotFoundException _ex)

  {

  settings = new Settings();

  }

  finally

  {

  Application. Run(new MainFrame());

  }

  }

  }

  }

}

Файл MainFrame. cs

using System;

using System. Collections. Generic;

using ponentModel;

using System. Data;

using System. Drawing;

using System. Linq;

using System. Text;

using System. Windows. Forms;

namespace Realty

{

  public partial class MainFrame : Form

  {

  public MainFrame()

  {

  InitializeComponent();

  ActivateControls();

  }

  private void menuAboutItem_Click(object sender, EventArgs e)

  {

  Realty. AboutBox aboutDlg = new AboutBox();

  aboutDlg. ShowDialog(this);

  }

  private void ActivateControls()

  {

  statusUser. Text = "Пользователь: " + Program. currentUser. GetShortName();

  statusPermission. Text = "Права: " + Program. currentUser. m_PermissionStr;

  if (Program. currentUser. m_Permission!= 1) this. menuAdmin. Enabled = false;

  }

  private void OnKLADRDialog(object sender, EventArgs e)

  {

  KLADRDialog KLADRDialog = new KLADRDialog();

  KLADRDialog. ShowDialog(this);

  }

  private void OnClientsItem(object sender, EventArgs e)

  {

  ClientList newClientList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if (_form is ClientList) newClientList = (ClientList)_form;

  }

  if (newClientList == null)

  {

  newClientList = new ClientList(this, MyChildForm. FrameType. ClientList);

  newClientList. Show();

  }

  else

  {

  newClientList. Activate();

  newClientList. RetrieveGrids();

  }

  }

  private void menuSpravItem1_Click(object sender, EventArgs e)

  {

  OpenSpravList(1);

  }

  private void menuSpravItem2_Click(object sender, EventArgs e)

  {

  OpenSpravList(2);

  }

  private void menuSpravItem3_Click(object sender, EventArgs e)

  {

  OpenSpravList(3);

  }

  private void menuSpravItem4_Click(object sender, EventArgs e)

  {

  OpenSpravList(4);

  }

  private void menuSpravItem5_Click(object sender, EventArgs e)

  {

  OpenSpravList(5);

  }

  private void menuSpravItem6_Click(object sender, EventArgs e)

  {

  OpenSpravList(6);

  }

  private void OpenSpravList(int _idSprav)

  {

  SpravList _newSpravList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if ((_form is SpravList) && (((SpravList)_form).m_IDSprav==_idSprav)) _newSpravList = (SpravList)_form;

  }

  if (_newSpravList == null)

  {

  _newSpravList = new SpravList(this, MyChildForm. FrameType. ClientList, _idSprav);

  _newSpravList. Show();

  }

  else

  {

  _newSpravList. Activate();

  _newSpravList. RetrieveGrids();

  }

  }

  private void OnObjectsItem(object sender, EventArgs e)

  {

  RealObjectList newObjectList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if (_form is RealObjectList) newObjectList = (RealObjectList)_form;

  }

  if (newObjectList == null)

  {

  newObjectList = new RealObjectList(this, MyChildForm. FrameType. ObjectList);

  newObjectList. Show();

  }

  else

  {

  newObjectList. Activate();

  newObjectList. RetrieveGrids();

  }

  }

  private void OnLandItem(object sender, EventArgs e)

  {

  LandList newLandList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if (_form is LandList) newLandList = (LandList)_form;

  }

  if (newLandList == null)

  {

  newLandList = new LandList(this, MyChildForm. FrameType. ObjectList);

  newLandList. Show();

  }

  else

  {

  newLandList. Activate();

  newLandList. RetrieveGrids();

  }

  }

  private void OnLandRequestItem(object sender, EventArgs e)

  {

  OpenRequestList(1);

  }

  private void OnObjectRequestItem(object sender, EventArgs e)

  {

  OpenRequestList(2);

  }

  private void OnBuildRequestItem(object sender, EventArgs e)

  {

  OpenRequestList(3);

  }

  private void OpenRequestList(int _typeRequest)

  {

  RequestList _newRequestList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if ((_form is RequestList) && (((RequestList)_form).m_IDRequest == _typeRequest)) _newRequestList = (RequestList)_form;

  }

  if (_newRequestList == null)

  {

  _newRequestList = new RequestList(this, MyChildForm. FrameType. ClientList, _typeRequest);

  _newRequestList. Show();

  }

  else

  {

  _newRequestList. Activate();

  _newRequestList. RetrieveGrids();

  }

  }

  private void OnUserListClick(object sender, EventArgs e)

  {

  UserList newUserList = null;

  foreach (Form _form in Application. OpenForms)

  {

  if (_form is UserList) newUserList = (UserList)_form;

  }

  if (newUserList == null)

  {

  newUserList = new UserList(this, MyChildForm. FrameType. UserList);

  newUserList. Show();

  }

  else

  {

  newUserList. Activate();

  //newUserList. RetrieveGrids();

  }

  }

  private void OnSettingsClick(object sender, EventArgs e)

  {

  SettingsDialog _dlg = new SettingsDialog();

  _dlg. ShowDialog(this);

  }

  }

}

Файл MyChildForm. cs

using System;

using System. Collections. Generic;

using ponentModel;

using System. Data;

using System. Drawing;

using System. Linq;

using System. Text;

using System. Windows. Forms;

namespace Realty

{

  public partial class MyChildForm : Form

  {

  public enum FrameType

  {

  RequestList = 1,

  UserList = 2,

  SpravList = 3,

  ClientList = 4,

  ObjectList = 5

  }

  public FrameType m_FrameType;

  public MyChildForm()

  {

  }

  public MyChildForm(MainFrame _mainFrame, FrameType _frameType)

  {

  this. MdiParent = _mainFrame;

  this. m_FrameType = _frameType;

  }

  }

}

Файл Address. cs

using System;

using System. Collections. Generic;

using System. Linq;

using System. Text;

using System. Data. OleDb;

using System. Data;

namespace Realty

{

  public class Address

  {

  public string m_Region = "00";

  public string m_District = "00";

  public string m_City = "00";

  public string m_Place = "00";

  public string m_Street = "00";

  public string m_House = "";

  public string m_Build = "";

  public string m_Appartment = "";

  public Address()

  {

  }

  public Address(string _region, string _district, string _city, string _place, string _street, string _house, string _build, string _appartment)

  {

  m_Region = _region;

  m_District = _district;

  m_City = _city;

  m_Place = _place;

  m_Street = _street;

Из за большого объема этот материал размещен на нескольких страницах:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19