/// <summary> /// Проверка динамических прав /// </summary> private void CheckClientsRight() { try { System.Boolean bEditCustomerCurrentLimit = m_objProfile.GetClientsRight().GetState(ERP_Mercury.Global.Consts.strDR_EditCustomerCurrentLimit); System.Boolean bEditCustomerApprovedLimit = m_objProfile.GetClientsRight().GetState(ERP_Mercury.Global.Consts.strDR_EditCustomerApprovedLimit); if ((bEditCustomerCurrentLimit == false) && (bEditCustomerApprovedLimit == false)) { btnEdit.Visible = false; btnPrint.Visible = false; btnSave.Visible = false; } colDayApprov.OptionsColumn.ReadOnly = (bEditCustomerApprovedLimit == false); colDayApprov.ImageIndex = (bEditCustomerApprovedLimit == false) ? 0 : -1; colMoneyApprov.OptionsColumn.ReadOnly = (bEditCustomerApprovedLimit == false); colMoneyApprov.ImageIndex = (bEditCustomerApprovedLimit == false) ? 0 : -1; colDay.OptionsColumn.ReadOnly = (bEditCustomerCurrentLimit == false); colDay.ImageIndex = (bEditCustomerCurrentLimit == false) ? 0 : -1; colMoney.OptionsColumn.ReadOnly = (bEditCustomerCurrentLimit == false); colMoney.ImageIndex = (bEditCustomerCurrentLimit == false) ? 0 : -1; } catch (System.Exception f) { SendMessageToLog("CheckClientsRight. Текст ошибки: " + f.Message); } finally { } return; }
/// <summary> /// Проверка динамических прав /// </summary> private void CheckClientsRight() { try { if (m_objProfile.GetClientsRight().GetState(ERP_Mercury.Global.Consts.strDR_EditWarehouseCard) == false) // проверить что возвращается здесь. Здесь возвращается false, как будто нету прав, а они есть. разобраться { btnEdit.Visible = false; btnPrint.Visible = false; btnSave.Visible = false; //this.Controls.Remove(tableLayoutPanel4); } else { btnEdit.Visible = true; btnCancel.Visible = true; //btnPrint.Visible = true; btnSave.Visible = true; } //objClientRights = null; } catch (System.Exception f) { SendMessageToLog("CheckClientsRight. Текст ошибки: " + f.Message); } finally { } return; }
/// <summary> /// Проверка динамических прав /// </summary> private void CheckClientsRight() { try { if (m_objProfile.GetClientsRight().GetState(ERP_Mercury.Global.Consts.strDR_EditAgreementWithCustomerCard) == false) { btnEdit.Visible = false; btnPrint.Visible = false; btnSave.Visible = false; } } catch (System.Exception f) { SendMessageToLog("CheckClientsRight. Текст ошибки: " + f.Message); } finally { } return; }
/// <summary> /// Проверка динамических прав /// </summary> private void CheckClientsRight() { try { System.Boolean bEditCustomerChildList = m_objProfile.GetClientsRight().GetState(ERP_Mercury.Global.Consts.strDR_EditCustomerChildDepartLimit); if (bEditCustomerChildList == false) { btnEdit.Visible = false; btnPrint.Visible = false; btnSave.Visible = false; } } catch (System.Exception f) { SendMessageToLog("CheckClientsRight. Текст ошибки: " + f.Message); } finally { } return; }