Exemplo n.º 1
0
        /// <summary>
        /// When the client select the login that wants to edit the not necessarily labels and comboboxes are hiding
        /// from the form and then the neccesarily labels and tetxboxes are pop up. Then fills all the fields with
        /// the data of the selected login.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void BtnSelect_Click(object sender, EventArgs e)
        {
            guidelbl.Show();
            label2.Show();
            TbxUsername.Show();
            TbxPassword.Show();
            BtnEdit.Show();

            label1.Hide();
            CmbUsername.Hide();
            BtnSelect.Hide();

            SelectedData = DCom.GetData(String.Format(SqlExec, CmbUsername.SelectedValue));

            TbxUsername.Text = (string)SelectedData.Rows[0]["Username"];
            TbxPassword.Text = (string)SelectedData.Rows[0]["Password"];
        }
Exemplo n.º 2
0
        /// <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";
        }
Exemplo n.º 3
0
        /// <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";
        }