Exemplo n.º 1
0
        private void DTPFile_AddEdit_Load(object sender, EventArgs e)
        {
            FillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_dtpFile.ID == 0);
        }
Exemplo n.º 2
0
        private void TempMove_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_tempMove.ID == 0);
        }
Exemplo n.º 3
0
        private void aeModel_Load(object sender, EventArgs e)
        {
            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_model.ID == 0);
        }
Exemplo n.º 4
0
        private void aeModel_Load(object sender, EventArgs e)
        {
            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_model.ID == 0);
        }
Exemplo n.º 5
0
        private void CarDoc_AddEdit_Load(object sender, EventArgs e)
        {
            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_carDoc.ID == 0);
        }
Exemplo n.º 6
0
        private void Repair_AddEdit_Load(object sender, EventArgs e)
        {
            FillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_repair.ID == 0);
        }
Exemplo n.º 7
0
        private void TempMove_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_tempMove.ID == 0);
        }
Exemplo n.º 8
0
        private void MedicalCert_AddEdit_Load(object sender, EventArgs e)
        {
            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_medicalCert.ID == 0);
        }
Exemplo n.º 9
0
        private void Instraction_AddEdit_Load(object sender, EventArgs e)
        {
            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_instraction.ID == 0);
        }
Exemplo n.º 10
0
        private void aeDTP_Load(object sender, EventArgs e)
        {
            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_dtp.ID == 0);
        }
Exemplo n.º 11
0
        private void aeDTP_Load(object sender, EventArgs e)
        {
            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_dtp.ID == 0);
        }
Exemplo n.º 12
0
        private void Route_AddEdit_Load(object sender, EventArgs e)
        {
            FillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetEnable;
            _workWithForm.SetEditMode(_route.ID == 0);
        }
Exemplo n.º 13
0
        private void FuelCardDriver_AddEdit_Load(object sender, EventArgs e)
        {
            LoadDictionary();

            LoadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_fuelCardDriver.ID == 0);
        }
Exemplo n.º 14
0
        private void aeGrade_Load(object sender, EventArgs e)
        {
            loadTypeEngine();

            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_grade.ID == 0);
        }
Exemplo n.º 15
0
        private void FuelCardDriver_AddEdit_Load(object sender, EventArgs e)
        {
            LoadDictionary();

            LoadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_fuelCardDriver.ID == 0);
        }
Exemplo n.º 16
0
        private void ShipPart_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionary();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(shipPart.ID == 0);
        }
Exemplo n.º 17
0
        private void Violation_AddEdit_Load(object sender, EventArgs e)
        {
            fillFields();

            changeVisible();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_violation.ID == 0);
        }
Exemplo n.º 18
0
        private void aeGrade_Load(object sender, EventArgs e)
        {
            loadTypeEngine();

            fillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_grade.ID == 0);
        }
Exemplo n.º 19
0
        private void aeSuppyAddress_Load(object sender, EventArgs e)
        {
            loadRegions();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EnableIfAccountWayBill;
            _workWithForm.SetEditMode(_suppyAddress.ID == 0);
        }
Exemplo n.º 20
0
        private void Invoice_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            this.Text = "Перемещение №" + _invoice.Number;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EditModeChanged;
            _workWithForm.SetEditMode(_invoice.ID == 0);
        }
Exemplo n.º 21
0
        private void aeEmployees_Load(object sender, EventArgs e)
        {
            loadDictionaries();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EnableIfAccountWayBill;
            _workWithForm.SetEditMode(_employees.ID == 0);
        }
Exemplo n.º 22
0
        private void Driver_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            tbNumber.Visible = lbNumber.Visible = (_driver.OwnerID < 3);

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetEnable;
            _workWithForm.SetEditMode(_driver.ID == 0);
        }
Exemplo n.º 23
0
        private void aeSuppyAddress_Load(object sender, EventArgs e)
        {
            loadRegions();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EnableIfAccountWayBill;
            _workWithForm.SetEditMode(_suppyAddress.ID == 0);
        }
Exemplo n.º 24
0
        private void aeUserAccess_Load(object sender, EventArgs e)
        {
            loadDictionary();

            cbDriver.SelectedValue = _userAccess.Driver.ID;
            cbRole.SelectedValue = _userAccess.RoleID;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_userAccess.ID == 0);
        }
Exemplo n.º 25
0
        private void aeSsDTP_Load(object sender, EventArgs e)
        {
            loadDictionary();

            cbMark.SelectedValue            = _ssDTP.ID;
            cbServiceStantion.SelectedValue = _ssDTP.IDServiceStantion;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_ssDTP.ID == 0);
        }
Exemplo n.º 26
0
        private void aeEmployees_Load(object sender, EventArgs e)
        {
            loadDictionaries();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EnableIfAccountWayBill;
            _workWithForm.SetEditMode(_employees.ID == 0);
        }
Exemplo n.º 27
0
        private void Point_AddEdit_Load(object sender, EventArgs e)
        {
            Regions regions = Regions.getInstance();

            lbRegion.Text = string.Concat("Регион: ", regions.getItem(_mypoint.RegionID));
            tbName.Text   = _mypoint.Name;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetEnable;
            _workWithForm.SetEditMode(_mypoint.ID == 0);
        }
Exemplo n.º 28
0
        private void aeUserAccess_Load(object sender, EventArgs e)
        {
            loadDictionary();

            if (_userAccess.Driver != null)
            {
                cbDriver.SelectedValue = _userAccess.Driver.ID;
            }
            cbRole.SelectedValue = _userAccess.RoleID;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_userAccess.ID == 0);
        }
Exemplo n.º 29
0
        private void aeAccount_Load(object sender, EventArgs e)
        {
            loadDictionary();

            loadData();

            ChangeEnableBtnAddPolicy();
            ChangeEnableComboBoxes();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_account.ID == 0);
            _workWithForm.SetEnableValue(btnSave, (!_account.Agreed));
        }
Exemplo n.º 30
0
        private void aeAccount_Load(object sender, EventArgs e)
        {
            loadDictionary();

            loadData();

            ChangeEnableBtnAddPolicy();
            ChangeEnableComboBoxes();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_account.ID == 0);
            _workWithForm.SetEnableValue(btnSave, (!_account.Agreed));
        }
Exemplo n.º 31
0
        private void FuelCard_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionaries();

            LoadData();

            loadDriverList();

            EnterTextBox();
            LeaveTextBox();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_fuelCard.ID == 0);
        }
Exemplo n.º 32
0
        private void Policy_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionary();

            if (_policy.ID == 0)
            {
                changeDateEnd();
            }
            else
            {
                fillFields();
            }

            setVisible();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_policy.ID == 0);
        }
Exemplo n.º 33
0
        private void Car_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            SetWindowHeader();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetNotEditableItems;
            _workWithForm.SetEditMode(_car.ID == 0 || (!_car.IsGet));


            /*TODO: Столярова видит основную инфу */
            if (User.getDriver().UserRole == RolesList.AccountantWayBill)
            {
                foreach (TabPage tab in tabControl1.TabPages)
                {
                    tab.Parent = null;
                }

                tabMileage.Parent = tabControl1;
                tabMain.Parent    = tabControl1;
            }
        }
Exemplo n.º 34
0
        private void Car_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            SetWindowHeader();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetNotEditableItems;
            _workWithForm.SetEditMode(_car.ID == 0 || (!_car.IsGet));

            if (User.getDriver().UserRole == RolesList.AccountantWayBill)
            {
                foreach (TabPage tab in tabControl1.TabPages)
                {
                    tab.Parent = null;
                }

                tabMileage.Parent = tabControl1;
            }
        }
Exemplo n.º 35
0
        private void ShipPart_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionary();

            loadData();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(shipPart.ID == 0);
        }
Exemplo n.º 36
0
        private void Driver_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            tbNumber.Visible = lbNumber.Visible = (_driver.OwnerID < 3);

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetEnable;
            _workWithForm.SetEditMode(_driver.ID == 0);
        }
Exemplo n.º 37
0
        private void Violation_AddEdit_Load(object sender, EventArgs e)
        {
            fillFields();

            changeVisible();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_violation.ID == 0);
        }
Exemplo n.º 38
0
        private void Policy_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionary();

            if (_policy.ID == 0)
                changeDateEnd();
            else
                fillFields();

            setVisible();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_policy.ID == 0);
        }
Exemplo n.º 39
0
        private void Invoice_AddEdit_Load(object sender, EventArgs e)
        {
            loadData();

            this.Text = "Перемещение №" + _invoice.Number;

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += EditModeChanged;
            _workWithForm.SetEditMode(_invoice.ID == 0);
        }
Exemplo n.º 40
0
        private void FuelCard_AddEdit_Load(object sender, EventArgs e)
        {
            loadDictionaries();

            LoadData();

            loadDriverList();

            EnterTextBox();
            LeaveTextBox();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.SetEditMode(_fuelCard.ID == 0);
        }
Exemplo n.º 41
0
        private void Route_AddEdit_Load(object sender, EventArgs e)
        {
            FillFields();

            _workWithForm = new WorkWithForm(this.Controls, btnSave, btnClose);
            _workWithForm.EditModeChanged += SetEnable;
            _workWithForm.SetEditMode(_route.ID == 0);
        }