예제 #1
0
        public ClientEditForm(int initialId, string initialName, string initialPhone, string initialEmail, string initialAnnotation)
        {
            InitializeComponent();

            _client = ClientsManagement.GetInstance();

            id = initialId;

            ClientEditForm_NameTextBox.Text       = name = initialName;
            ClientEditForm_PhoneTextBox.Text      = phone = initialPhone;
            ClientEditForm_EmailTextBox.Text      = email = initialEmail;
            ClientEditForm_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();
        }