Exemplo n.º 1
0
        private void Edit_Profile_Load(object sender, EventArgs e)
        {
            DataShow ds = new DataShow();

            String[] result = ds.datashow(username);

            textBox_name.Text = result[0];
            textBox_username.Text = result[1];
            textBox_designation.Text = result[2];
            textBox_phonenumber.Text = result[3];
            textBox_email.Text = result[4];
            richTextBox_address.Text = result[5];
            String dateOfBirth=result[6];
            String[] token = dateOfBirth.Split();
            comboBox_date.Text = token[0];
            comboBox_month.Text = token[1];
            comboBox_year.Text = token[2];
            String gender=result[7];

            if (gender.Equals("Male"))
            {
                radioButton_male.Checked = true;
            }

            else
            {
                radioButton_female.Checked = true;
            }
        }
Exemplo n.º 2
0
        private void Profile_Load(object sender, EventArgs e)
        {
            DataShow ds= new DataShow();

            String[] result = ds.datashow(username);

            label_name.Text=result[0];
            label_username.Text = result[1];
            label_designation.Text = result[2];
            label_phoneno.Text = result[3];
            label_email.Text = result[4];
            label_address.Text=result[5];
            label_dob.Text = result[6];
            label_gender.Text=result[7];
        }
Exemplo n.º 3
0
        private void button_Edit_Click(object sender, EventArgs e)
        {
            DataShow ds = new DataShow();
            String dob = comboBox_date.Text + " " + comboBox_month.Text + " " + comboBox_year.Text;
            String gender = "";

            if (radioButton_male.Checked)
            {
                gender = "Male";
            }

            else
            {
                gender = "Female";
            }

            Edit ed = new Edit();
            username=ed.editData(textBox_username.Text, textBox_name.Text, textBox_designation.Text, textBox_email.Text, textBox_phonenumber.Text, richTextBox_address.Text,dob,gender);

            MessageBox.Show("Your Information is updated!!!");

            Edit_Profile_Load(sender,e);
        }