Пример #1
0
        public DeviceEditForm(int initialId, string initialName, int initialType, string initialImei, string initialAnnotation)
        {
            InitializeComponent();

            _device = DevicesManagement.GetInstance();

            id = initialId;

            DeviceEditForm_NameTextBox.Text           = name = initialName;
            DeviceEditForm_TypeComboBox.SelectedIndex = type = initialType;
            DeviceEditForm_ImeiTextBox.Text           = imei = initialImei;
            DeviceEditForm_AnnotationTextBox.Text     = annotation = initialAnnotation;
        }
Пример #2
0
        public MainForm()
        {
            InitializeComponent();

            MessageBoxManager.Yes = Messages.Yes;
            MessageBoxManager.No  = Messages.No;
            MessageBoxManager.Register();

            _client = ClientsManagement.GetInstance();
            _device = DevicesManagement.GetInstance();
            _repair = RepairsManagement.GetInstance();

            clientBindingSource.DataSource = SerwisContext.GetContext().Clients.ToList();

            deviceBindingSource.DataSource = SerwisContext.GetContext().Devices.ToList();

            repairBindingSource.DataSource = SerwisContext.GetContext().Repairs.ToList();
        }
Пример #3
0
 private void Btn_OperationManagement_Click(object sender, RoutedEventArgs e)
 {
     try
     {
         if (new CheckAuthorityForm().ShowDialog() == true)
         {
             if ((devicesManagement == null))
             {
                 devicesManagement         = new DevicesManagement(this, 0, Thread.CurrentThread.CurrentCulture.ToString());
                 devicesManagement.Closed += DevicesManagement_Closed;
                 devicesManagement.Show();
             }
             else
             {
                 devicesManagement.ChangeTabIndex(0);
                 devicesManagement.Focus();
             }
         }
     }
     catch (Exception ex)
     {
         logFile.Error(ex.Message);
     }
 }
Пример #4
0
 private void DevicesManagement_Closed(object sender, EventArgs e)
 {
     devicesManagement = null;
 }