/// <summary> /// Finally when the client made the changes that he wants the program checks if all the fields /// all fields are fill. If all fields are fill then the program exec the apropriate querry for the /// update of the rating, else show a error message. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnSelect_Click(object sender, EventArgs e) { LblRatingValue.Show(); LblComment.Show(); LblUsername.Show(); TbxComment.Show(); TbxRatingValue.Show(); CmbUsername.Show(); BtnEdit.Show(); LblSelect.Hide(); CmbSelect.Hide(); BtnSelect.Hide(); SelectedData = DCom.GetData(String.Format(SqlExec, CmbSelect.SelectedValue)); TbxRatingValue.Text = SelectedData.Rows[0]["Rating_Value"].ToString(); TbxComment.Text = SelectedData.Rows[0]["Comment"].ToString(); CmbUsername.DataSource = DCom.GetData("SELECT * FROM users"); CmbUsername.DisplayMember = "Username"; CmbUsername.ValueMember = "Username"; }
/// <summary> /// When the client select the rating that wants to edit the not necessarily labels, tetxboxes and comboboxes are hiding /// from the form and then the neccesarily labels, tetxboxes and comboboxes are pop up. Then fills all the fields with /// the data of the selected rating. /// </summary> /// <param name="sender"></param> /// <param name="e"></param> private void BtnSelect_Click(object sender, EventArgs e) { LblBusiness.Show(); LblDate.Show(); LblPerson.Show(); LblUsername.Show(); CmbBusiness.Show(); CmbUsername.Show(); BtnEdit.Show(); TbxPerson.Show(); DtpDate.Show(); LblSelect.Hide(); CmbSelect.Hide(); BtnSelect.Hide(); SelectedData = DCom.GetData(String.Format(SqlExec, CmbSelect.SelectedValue)); TbxPerson.Text = SelectedData.Rows[0]["Persons"].ToString(); CmbBusiness.DataSource = DCom.GetData("SELECT businesses.ID, CONCAT(businesses.Business_Name, ', ', location.Address_Name, ', ', location.Municipality) AS NAME FROM businesses, location WHERE businesses.Location_ID = location.ID"); CmbBusiness.DisplayMember = "NAME"; CmbBusiness.ValueMember = "ID"; CmbUsername.DataSource = DCom.GetData("SELECT * FROM users"); CmbUsername.DisplayMember = "Username"; CmbUsername.ValueMember = "Username"; CmbUsername.Text = SelectedData.Rows[0]["User"].ToString(); CmbBusiness.Text = SelectedData.Rows[0]["BusinessID"].ToString(); }
/// <summary> /// In forms constructor the not necessarily labels, tetxboxes and comboboxes are hiding /// from the form. Then the combobox for ratings(CmbSelect) is filling with the data of the table. /// </summary> public EditRatingsForm() { InitializeComponent(); LblRatingValue.Hide(); LblComment.Hide(); LblUsername.Hide(); TbxComment.Hide(); TbxRatingValue.Hide(); CmbUsername.Hide(); BtnEdit.Hide(); CmbSelect.DataSource = DCom.GetData("SELECT *, CONCAT(Username, ', ', Rating_Value) AS NAME FROM ratings"); CmbSelect.DisplayMember = "NAME"; CmbSelect.ValueMember = "ID"; }
void ReleaseDesignerOutlets() { if (BtnLogin != null) { BtnLogin.Dispose(); BtnLogin = null; } if (FullImageView != null) { FullImageView.Dispose(); FullImageView = null; } if (LblEmailAddress != null) { LblEmailAddress.Dispose(); LblEmailAddress = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } if (TxtPassword != null) { TxtPassword.Dispose(); TxtPassword = null; } if (TxtUserName != null) { TxtUserName.Dispose(); TxtUserName = null; } if (BtnLogout != null) { BtnLogout.Dispose(); BtnLogout = null; } }
/// <summary> /// In forms constructor the not necessarily labels and tetxboxes are hiding /// from the form. Then the combobox for ratings(CmbSelect) is filling /// from the rating(rating) table. /// </summary> public EditReservationForm() { InitializeComponent(); LblBusiness.Hide(); LblDate.Hide(); LblPerson.Hide(); LblUsername.Hide(); CmbBusiness.Hide(); CmbUsername.Hide(); BtnEdit.Hide(); TbxPerson.Hide(); DtpDate.Hide(); CmbSelect.DataSource = DCom.GetData("SELECT *, CONCAT(Username, ', ', Rating_Value) AS NAME FROM ratings"); CmbSelect.DisplayMember = "NAME"; CmbSelect.ValueMember = "ID"; }
void ReleaseDesignerOutlets() { if (BtnLogin != null) { BtnLogin.Dispose(); BtnLogin = null; } if (LblPassword != null) { LblPassword.Dispose(); LblPassword = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } if (LoadingIndicator != null) { LoadingIndicator.Dispose(); LoadingIndicator = null; } if (TxtPassword != null) { TxtPassword.Dispose(); TxtPassword = null; } if (TxtUsername != null) { TxtUsername.Dispose(); TxtUsername = null; } }
void ReleaseDesignerOutlets() { if (TxtFriendlyName != null) { TxtFriendlyName.Dispose(); TxtFriendlyName = null; } if (BtnAddCertificate != null) { BtnAddCertificate.Dispose(); BtnAddCertificate = null; } if (BtnAdvanced != null) { BtnAdvanced.Dispose(); BtnAdvanced = null; } if (BtnBack != null) { BtnBack.Dispose(); BtnBack = null; } if (BtnHelpADWindowsIntegrated != null) { BtnHelpADWindowsIntegrated.Dispose(); BtnHelpADWindowsIntegrated = null; } if (BtnHelpCredentials != null) { BtnHelpCredentials.Dispose(); BtnHelpCredentials = null; } if (BtnHelpDomainName != null) { BtnHelpDomainName.Dispose(); BtnHelpDomainName = null; } if (BtnNext != null) { BtnNext.Dispose(); BtnNext = null; } if (BtnPrimaryImport != null) { BtnPrimaryImport.Dispose(); BtnPrimaryImport = null; } if (BtnRemoveCertificate != null) { BtnRemoveCertificate.Dispose(); BtnRemoveCertificate = null; } if (BtnSecondaryImport != null) { BtnSecondaryImport.Dispose(); BtnSecondaryImport = null; } if (BtnTestConnection != null) { BtnTestConnection.Dispose(); BtnTestConnection = null; } if (ChkProtect != null) { ChkProtect.Dispose(); ChkProtect = null; } if (LblPassword != null) { LblPassword.Dispose(); LblPassword = null; } if (LblSpn != null) { LblSpn.Dispose(); LblSpn = null; } if (LblUsername != null) { LblUsername.Dispose(); LblUsername = null; } if (LstCertificates != null) { LstCertificates.Dispose(); LstCertificates = null; } if (PnlProtect != null) { PnlProtect.Dispose(); PnlProtect = null; } if (PnlSpecificDomainController != null) { PnlSpecificDomainController.Dispose(); PnlSpecificDomainController = null; } if (PnlStep1 != null) { PnlStep1.Dispose(); PnlStep1 = null; } if (PnlStep2 != null) { PnlStep2.Dispose(); PnlStep2 = null; } if (PnlStep3 != null) { PnlStep3.Dispose(); PnlStep3 = null; } if (PnlStep4 != null) { PnlStep4.Dispose(); PnlStep4 = null; } if (RdoDomainController != null) { RdoDomainController.Dispose(); RdoDomainController = null; } if (RdoIdentitySource != null) { RdoIdentitySource.Dispose(); RdoIdentitySource = null; } if (RdoSpn != null) { RdoSpn.Dispose(); RdoSpn = null; } if (StepIndicator != null) { StepIndicator.Dispose(); StepIndicator = null; } if (TxtBaseDnGroups != null) { TxtBaseDnGroups.Dispose(); TxtBaseDnGroups = null; } if (TxtBaseDnUser != null) { TxtBaseDnUser.Dispose(); TxtBaseDnUser = null; } if (TxtDomainAlias != null) { TxtDomainAlias.Dispose(); TxtDomainAlias = null; } if (TxtDomainName != null) { TxtDomainName.Dispose(); TxtDomainName = null; } if (TxtGroupbaseDN != null) { TxtGroupbaseDN.Dispose(); TxtGroupbaseDN = null; } if (TxtLdapConnection != null) { TxtLdapConnection.Dispose(); TxtLdapConnection = null; } if (TxtPassword != null) { TxtPassword.Dispose(); TxtPassword = null; } if (TxtPrimaryConnection != null) { TxtPrimaryConnection.Dispose(); TxtPrimaryConnection = null; } if (TxtPrimaryUrl != null) { TxtPrimaryUrl.Dispose(); TxtPrimaryUrl = null; } if (TxtSecondaryConnection != null) { TxtSecondaryConnection.Dispose(); TxtSecondaryConnection = null; } if (TxtSpn != null) { TxtSpn.Dispose(); TxtSpn = null; } if (TxtUpn != null) { TxtUpn.Dispose(); TxtUpn = null; } }