コード例 #1
0
        private void UpdateMemberButton_Click(object sender, EventArgs e)
        {
            try
            {
                MembersData ed = new MembersData();

                SqlMemberRepository members = new SqlMemberRepository(connectionString);
                members.UpdateMember(Convert.ToInt32(MemberIdTextbox.Text), EmailTextBox.Text, FirstNameTextBox.Text, LastNameTextBox.Text, PhoneTextBox.Text, BillingAddressTextBox.Text, Convert.ToInt32(PointsTextBox.Text), Convert.ToDateTime(JoinedOnTextBox.Text), Convert.ToDateTime(BirthDateTextBox.Text), StatusTextBox.Text);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.ToString());
            }
        }
コード例 #2
0
ファイル: CreateMemberForm.cs プロジェクト: akshay1929/560GP
        private void CreateMemberButton_Click(object sender, EventArgs e)
        {
            try
            {
                SqlMemberRepository members = new SqlMemberRepository(connectionString);

                Member createMember = members.CreateMember(EmailTextBox.Text, FirstNameTextBox.Text, LastNameTextBox.Text, PhoneTextBox.Text, BillingAddressTextBox.Text, Convert.ToInt32(PointsTextBox.Text), Convert.ToDateTime(JoinedOnTextBox.Text), Convert.ToDateTime(BirthDateTextBox.Text), StatusTextBox.Text);
                list.Add(createMember);

                MembersData md = new MembersData();
                md.dataGridView1.DataSource = list;
            }
            catch (Exception ex)
            {
                MessageBox.Show("There cannot be any empty or incorrectly entered parameters.Check submission.");
            }
        }
コード例 #3
0
ファイル: MainDataSelection.cs プロジェクト: akshay1929/560GP
        private void MembersButton_Click(object sender, EventArgs e)
        {
            MembersData ed = new MembersData();

            ed.ShowDialog();
        }