Exemplo n.º 1
0
        private void button1_Click(object sender, EventArgs e)
        {
            LOGIN obl = new LOGIN();

            this.Hide();
            obl.Show();
        }
Exemplo n.º 2
0
        private void button1_Click(object sender, EventArgs e)
        {
            try
            {
                connection.Open();


                String     tax = taxPaidTextBox.Text.ToString();
                String     ann = annual_IncomeTextBox.Text.ToString();
                int        a   = Convert.ToInt32(ann);
                int        t   = Convert.ToInt32(tax);
                SqlCommand cmd = new SqlCommand("Insert into PAN (PAN,Name,DOB,Taxpaid,Annual_Income,Occupation,UID) Values(@PAN,@Name,@DOB,@Taxpaid,@Annual_Income,@Occupation,@UID)", connection);


                cmd.Parameters.AddWithValue("@PAN", pANTextBox.Text);
                cmd.Parameters.AddWithValue("@Name", nameTextBox.Text);
                cmd.Parameters.AddWithValue("@DOB", str);
                cmd.Parameters.AddWithValue("@Taxpaid", taxPaidTextBox.Text);
                cmd.Parameters.AddWithValue("@Annual_Income", annual_IncomeTextBox.Text);
                cmd.Parameters.AddWithValue("@Occupation", occupationComboBox.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@UID", st);

                cmd.ExecuteNonQuery();


                if (t == 0 && a > 250000)
                {
                    MessageBox.Show("As you have not Paid any Tax you are not Eligible to apply for any Government Services ");

                    SqlCommand cmd1 = new SqlCommand("DELETE FROM AADHAAR WHERE UID=@UID", connection);
                    cmd.ExecuteNonQuery();
                    LOGIN oblog = new LOGIN();
                    this.Hide();
                    oblog.Show();
                }
                else
                {
                    Bankpage obj3 = new Bankpage(st, pANTextBox.Text);
                    this.Hide();
                    obj3.Show();
                }
            }
            catch (System.Exception excp)
            {
                MessageBox.Show("Error is :" + excp);
                connection.Close();
            }
        }
Exemplo n.º 3
0
        private void button1_Click(object sender, EventArgs e)

        {
            try
            {
                connection.Open();
                SqlCommand cmd = new SqlCommand("insertAadhaar", connection);
                cmd.CommandType = CommandType.StoredProcedure;
                /*SqlCommand cmd = new SqlCommand("Insert into AADHAAR (UID,Name,Phone,DOB,Address,Gender,Password) Values(@UID,@Name,@Phone,@DOB,@Address,@Gender,@Password)",connection); */

                cmd.Parameters.AddWithValue("@UID", uidTextBox.Text);
                cmd.Parameters.AddWithValue("@Name", nameTextBox.Text);
                cmd.Parameters.AddWithValue("@Phone", phoneTextBox.Text);
                cmd.Parameters.AddWithValue("@DOB", dobBox.Text);
                cmd.Parameters.AddWithValue("@Address", addressTextBox.Text);
                cmd.Parameters.AddWithValue("@Gender", genderBox.SelectedItem.ToString());
                cmd.Parameters.AddWithValue("@Password", passwordTextBox.Text);

                cmd.ExecuteNonQuery();


                PANpage obj2 = new PANpage(uidTextBox.Text, dobBox.Text);

                this.Hide();
                obj2.Show();
            }
            catch (System.Data.SqlClient.SqlException excp)
            {
                MessageBox.Show("UID Already Registered.Please Login!");
                LOGIN obl = new LOGIN();
                this.Hide();
                obl.Show();
                connection.Close();
            }

            catch (System.Exception excp)
            {
                MessageBox.Show("Details Not entered correctly!");
                connection.Close();
            }
        }