Exemplo n.º 1
0
 private void SetEnable(Object sender, EditModeEventArgs e)
 {
     if (User.GetRole() == RolesList.AccountantWayBill)
     {
         _workWithForm.SetEnableValue(btnSave, true);
     }
 }
Exemplo n.º 2
0
        protected virtual void OnEditModeChanged(EditModeEventArgs e)
        {
            EventHandler<EditModeEventArgs> temp = EditModeChanged;

            if (temp != null)
                temp(this, e);
        }
Exemplo n.º 3
0
 private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e)
 {
     if (!User.IsFullAccess())
     {
         _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill);
     }
 }
Exemplo n.º 4
0
        private void SetEnable(Object sender, EditModeEventArgs e)
        {
            /*TODO: для Столяровй сделать видимой инфу про водителя*/
            //if (User.GetRole() == RolesList.AccountantWayBill)
            //{
            //    this.Size = new System.Drawing.Size(410, 486);
            //    _workWithForm.SetEnableValue(btnSave, true);
            //}

            if (_workWithForm.IsEditMode())
            {
                if (_driver.From1C)
                {
                    tbCompany.ReadOnly = true;

                    rbMan.Enabled   = false;
                    rbWoman.Enabled = false;

                    tbFio.ReadOnly      = true;
                    cbRegion.Enabled    = false;
                    tbDept.ReadOnly     = true;
                    tbPosition.ReadOnly = true;
                    chbDecret.Enabled   = false;
                    chbFired.Enabled    = false;

                    mtbDateBirth.ReadOnly = true;
                    tbLogin.ReadOnly      = true;
                }

                tbNumber.ReadOnly = _driver.From1C;
            }
        }
Exemplo n.º 5
0
        private void SetNotEditableItems(Object sender, EditModeEventArgs e)
        {
            if (_car.IsGet)
            {
                cbMark.Enabled        = false;
                cbModel.Enabled       = false;
                cbGrade.Enabled       = false;
                mtbGRZ.ReadOnly       = true;
                tbVin.ReadOnly        = true;
                tbENumber.ReadOnly    = true;
                tbBodyNumber.ReadOnly = true;
                tbYear.ReadOnly       = true;
                cbColor.Enabled       = false;

                cbOwner.Enabled          = false;
                cbRegionBuy.Enabled      = false;
                cbRegionUsing.Enabled    = false;
                cbDriver.Enabled         = false;
                dtpDateOrder.Enabled     = false;
                dtpDateGet.Enabled       = false;
                tbCost.ReadOnly          = true;
                tbDOP.ReadOnly           = true;
                tbEvents.ReadOnly        = true;
                cbDealer.Enabled         = false;
                tbDealerContacts.Enabled = false;
                chbLising.Enabled        = false;
                mtbLising.Enabled        = false;
            }

            tbInvertoryNumber.ReadOnly = true;
            tbBbNumber.Enabled         = false;
        }
Exemplo n.º 6
0
        private void DefaulEditModeChanged(Object sender, EditModeEventArgs e)
        {
            SetEnable(_controls);
            SetEnableValue(_btnClose, true);
            SetEnableValue(_btnSave, User.IsFullAccess());

            _btnSave.Text = (_editMode) ? "Сохранить" : "Редактировать";
        }
Exemplo n.º 7
0
        public void SetEditMode(bool enabled)
        {
            _editMode = enabled;

            EditModeEventArgs e = new EditModeEventArgs(enabled);

            OnEditModeChanged(e);
        }
Exemplo n.º 8
0
        private void DefaulEditModeChanged(Object sender, EditModeEventArgs e)
        {
            SetEnable(_controls);
            SetEnableValue(_btnClose, true);
            SetEnableValue(_btnSave, User.IsFullAccess());

            _btnSave.Text = (_editMode) ? "Сохранить" : "Редактировать";
        }
Exemplo n.º 9
0
        public void SetEditMode(bool enabled)
        {
            _editMode = enabled;

            EditModeEventArgs e = new EditModeEventArgs(enabled);

            OnEditModeChanged(e);
        }
Exemplo n.º 10
0
        protected virtual void OnEditModeChanged(EditModeEventArgs e)
        {
            EventHandler <EditModeEventArgs> temp = EditModeChanged;

            if (temp != null)
            {
                temp(this, e);
            }
        }
Exemplo n.º 11
0
 private void EditModeChanged(Object sender, EditModeEventArgs e)
 {
     if (_invoice.ID != 0)
     {
         cbDriverFrom.Enabled = false;
         cbRegionFrom.Enabled = false;
         dtpDate.Enabled      = false;
     }
 }
Exemplo n.º 12
0
 private void SetEnable(Object sender, EditModeEventArgs e)
 {
     if (User.GetRole() == RolesList.AccountantWayBill)
     {
         _workWithForm.SetEnableValue(btnSave, true);
     }
 }
Exemplo n.º 13
0
        private void SetEnable(Object sender, EditModeEventArgs e)
        {
            if (User.GetRole() == RolesList.AccountantWayBill)
            {
                this.Size = new System.Drawing.Size(410, 486);
                _workWithForm.SetEnableValue(btnSave, true);
            }

            if (_workWithForm.IsEditMode())
            {
                if (_driver.From1C)
                {
                    tbCompany.ReadOnly = true;

                    rbMan.Enabled = false;
                    rbWoman.Enabled = false;

                    tbFio.ReadOnly = true;
                    cbRegion.Enabled = false;
                    tbDept.ReadOnly = true;
                    tbPosition.ReadOnly = true;
                    chbDecret.Enabled = false;
                    chbFired.Enabled = false;

                    mtbDateBirth.ReadOnly = true;
                    tbLogin.ReadOnly = true;
                }

                tbNumber.ReadOnly = _driver.From1C;
            }
        }
Exemplo n.º 14
0
 private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e)
 {
     if (!User.IsFullAccess())
         _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill);
 }
Exemplo n.º 15
0
        private void SetNotEditableItems(Object sender, EditModeEventArgs e)
        {
            if (_car.IsGet)
            {
                cbMark.Enabled = false;
                cbModel.Enabled = false;
                cbGrade.Enabled = false;
                mtbGRZ.ReadOnly = true;
                tbVin.ReadOnly = true;
                tbENumber.ReadOnly = true;
                tbBodyNumber.ReadOnly = true;
                tbYear.ReadOnly = true;
                cbColor.Enabled = false;

                cbOwner.Enabled = false;
                cbRegionBuy.Enabled = false;
                cbRegionUsing.Enabled = false;
                cbDriver.Enabled = false;
                dtpDateOrder.Enabled = false;
                dtpDateGet.Enabled = false;
                tbCost.ReadOnly = true;
                tbDOP.ReadOnly = true;
                tbEvents.ReadOnly = true;
                cbDealer.Enabled = false;
                tbDealerContacts.Enabled = false;
                chbLising.Enabled = false;
                mtbLising.Enabled = false;
            }

            tbInvertoryNumber.ReadOnly = true;
            tbBbNumber.Enabled = false;
        }
Exemplo n.º 16
0
 private void EditModeChanged(Object sender, EditModeEventArgs e)
 {
     if (_invoice.ID != 0)
     {
         cbDriverFrom.Enabled = false;
         cbRegionFrom.Enabled = false;
         dtpDate.Enabled = false;
     }
 }