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

            if (temp != null)
                temp(this, e);
        }
Example #3
0
 private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e)
 {
     if (!User.IsFullAccess())
     {
         _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill);
     }
 }
Example #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;
            }
        }
Example #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;
        }
Example #6
0
        private void DefaulEditModeChanged(Object sender, EditModeEventArgs e)
        {
            SetEnable(_controls);
            SetEnableValue(_btnClose, true);
            SetEnableValue(_btnSave, User.IsFullAccess());

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

            EditModeEventArgs e = new EditModeEventArgs(enabled);

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

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

            EditModeEventArgs e = new EditModeEventArgs(enabled);

            OnEditModeChanged(e);
        }
Example #10
0
        protected virtual void OnEditModeChanged(EditModeEventArgs e)
        {
            EventHandler <EditModeEventArgs> temp = EditModeChanged;

            if (temp != null)
            {
                temp(this, e);
            }
        }
Example #11
0
 private void EditModeChanged(Object sender, EditModeEventArgs e)
 {
     if (_invoice.ID != 0)
     {
         cbDriverFrom.Enabled = false;
         cbRegionFrom.Enabled = false;
         dtpDate.Enabled      = false;
     }
 }
Example #12
0
 private void SetEnable(Object sender, EditModeEventArgs e)
 {
     if (User.GetRole() == RolesList.AccountantWayBill)
     {
         _workWithForm.SetEnableValue(btnSave, true);
     }
 }
Example #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;
            }
        }
Example #14
0
 private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e)
 {
     if (!User.IsFullAccess())
         _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill);
 }
Example #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;
        }
Example #16
0
 private void EditModeChanged(Object sender, EditModeEventArgs e)
 {
     if (_invoice.ID != 0)
     {
         cbDriverFrom.Enabled = false;
         cbRegionFrom.Enabled = false;
         dtpDate.Enabled = false;
     }
 }