private bool IsValidated() { try { if ((_LoginType != LoginType.AdminLogin) && (OrganizationComboBox.SelectedIndex == -1)) { MessageBox.Show(this, "Please select the Organization.", _ApplicationName.Length > 0 ? _ApplicationName : DefaultApplicationInfo.FullApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); OrganizationComboBox.Focus(); OrganizationComboBox.DroppedDown = true; return(false); } if (UserNameTextBox.Text.Length == 0) { MessageBox.Show(this, "Please enter the user name.", _ApplicationName.Length > 0 ? _ApplicationName : DefaultApplicationInfo.FullApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); UserNameTextBox.Focus(); return(false); } if (PasswordTextBox.Text.Length == 0) { MessageBox.Show(this, "Please enter the password.", _ApplicationName.Length > 0 ? _ApplicationName : DefaultApplicationInfo.FullApplicationName, MessageBoxButtons.OK, MessageBoxIcon.Warning); PasswordTextBox.Focus(); return(false); } return(true); } catch { throw; } }
private void AfterRefreshOrganization(bool showDropDown) { try { MainPanel.Enabled = true; OrganizationComboBox.DataSource = new BindingSource(_OrganizationDataSource, null); OrganizationComboBox.ValueMember = "Key"; OrganizationComboBox.DisplayMember = "Value"; OrganizationComboBox.SelectedValue = RxlConfiguration.GetCurrent().OrganizationCode; OrganizationComboBox.Focus(); OrganizationComboBox.DroppedDown = showDropDown; } catch { throw; } }