示例#1
0
        private void cmdSubmit_Click(object sender, EventArgs e)
        {
            Account ac = new Account();

            ac.AccountHolderName = txtName.Text;
            ac.ID          = txtID.Text;
            ac.DateOfBirth = GlobalFunction.GetDateTimeWithoutMiliSecond(dtpDOB.Value);

            AccountHandler acHanlder = new AccountHandler();
            Boolean        result    = acHanlder.AddNewAccount(ac);

            if (result == true)
            {
                MessageBox.Show("New Account created");
            }
            else
            {
                MessageBox.Show("Errror Occurs!");
            }
        }