Exemplo n.º 1
0
        public frmManageCustContacts(CrudModuleDataInfo ProviderInfo)
        {
            InitializeComponent();

            _providerInfo = ProviderInfo;
            tileLblCustomerDisplay.Text = _providerInfo.DisplayHeading;

            _appDataGridCrudInfoHelper.RefButCancel  = tileButCancel;
            _appDataGridCrudInfoHelper.RefButSave    = tileButSave;
            _appDataGridCrudInfoHelper.RefButRefresh = tileButRefresh;
            _appDataGridCrudInfoHelper.RefButEdit    = tileButEdit;
            _appDataGridCrudInfoHelper.RefButNew     = tileButNew;
            _appDataGridCrudInfoHelper.RefButDelete  = tileButDelete;
            _appDataGridCrudInfoHelper.RefDataGrid   = dataGridContacts;
            _appDataGridCrudInfoHelper.LoginDetails  = ProviderInfo.AuthInfo;
        }
Exemplo n.º 2
0
        private void tileButManageContacts_Click(object sender, EventArgs e)
        {
            if (_currentSelectedRow == null)
            {
                MetroMessageBox.Show(this, "No customer selected to view contacts!!");
                return;
            }

            CrudModuleDataInfo crudModuleDataInfo = new CrudModuleDataInfo();

            crudModuleDataInfo.AuthInfo       = _loginDetails;
            crudModuleDataInfo.DataRow        = _currentSelectedRow;
            crudModuleDataInfo.DisplayHeading = "Customer - " + txtCustomerName.Text.Trim();
            crudModuleDataInfo.ParentId       = Convert.ToInt32(_currentSelectedRow.ID);

            frmManageCustContacts customerContacts = new frmManageCustContacts(crudModuleDataInfo);

            customerContacts.ShowDialog();
        }