private void SetEnable(Object sender, EditModeEventArgs e) { if (User.GetRole() == RolesList.AccountantWayBill) { _workWithForm.SetEnableValue(btnSave, true); } }
protected virtual void OnEditModeChanged(EditModeEventArgs e) { EventHandler<EditModeEventArgs> temp = EditModeChanged; if (temp != null) temp(this, e); }
private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e) { if (!User.IsFullAccess()) { _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill); } }
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; } }
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; }
private void DefaulEditModeChanged(Object sender, EditModeEventArgs e) { SetEnable(_controls); SetEnableValue(_btnClose, true); SetEnableValue(_btnSave, User.IsFullAccess()); _btnSave.Text = (_editMode) ? "Сохранить" : "Редактировать"; }
public void SetEditMode(bool enabled) { _editMode = enabled; EditModeEventArgs e = new EditModeEventArgs(enabled); OnEditModeChanged(e); }
protected virtual void OnEditModeChanged(EditModeEventArgs e) { EventHandler <EditModeEventArgs> temp = EditModeChanged; if (temp != null) { temp(this, e); } }
private void EditModeChanged(Object sender, EditModeEventArgs e) { if (_invoice.ID != 0) { cbDriverFrom.Enabled = false; cbRegionFrom.Enabled = false; dtpDate.Enabled = false; } }
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; } }
private void EnableIfAccountWayBill(Object sender, EditModeEventArgs e) { if (!User.IsFullAccess()) _workWithForm.SetEnableValue(btnSave, User.GetRole() == RolesList.AccountantWayBill); }