public FormCreateUserFields()
        {
            InitializeComponent();
            metroGridTables.AutoGenerateColumns = false;
            metroTabControl1.SelectedIndex      = 0;

            FillServerTypes();
            FormatFiedType();
            FormatFieldSubType();
            metroTabPageCreateUserField.Hide();

            _tableRepository           = new Infra.SAPTableRepository(DataConnection.Instance);
            _connectionParamRepository = new Infra.ConnectionParamRepository(DataConnection.Instance);
            _settingRepository         = new SettingRepository(DataConnection.Instance);
            _connectinoParam           = _connectionParamRepository.GetConnectionParam();
            _SAPFieldRepository        = new SAPFieldRepository(_company);
            if (_connectinoParam == null)
            {
                _connectinoParam = new ConnectionParam();
            }
            metroComboBoxLanguage.SelectedValueChanged += MetroComboBoxLanguage_SelectedValueChanged;
            metroGridTables.CellMouseClick             += MetroGridTables_CellMouseClick;
            SetSetting();
            FillControls();

            metroToolTip2.SetToolTip(metroLinkContact, "*****@*****.**");
        }
Ejemplo n.º 2
0
        public FormNewTable(Company company, ISAPTableRepository tableRepository)
        {
            InitializeComponent();
            _setting = new Infra.SettingRepository(DataConnection.Instance).GetSetting();

            if (company == null)
            {
                throw new Exception("Conexão SAP inválida");
            }
            if (!company.Connected)
            {
                throw new Exception("Empresa SAP não conectada");
            }

            _company         = company;
            _tableRepository = tableRepository;
        }