/*public Login(ForgotPassword fp1,Home h) * { * * InitializeComponent(); * this.fp1 =fp1; * this.h = h; * * }*/ public Login(CitizenRegistration cr, Home h) { InitializeComponent(); this.cr = cr; this.h = h; this.Da = new DataAccess(); }
private void BtnNextRegistration_Click(object sender, EventArgs e) { string nid = this.txtNIDRegistration.Text; string password = this.txtPasswordRegistration.Text; string confirmpassword = this.txtboxConfirmPasswordRegistration.Text; if (nid == "" || password == "" || confirmpassword == "") { MessageBox.Show("You Must Fill up"); } else { if (this.txtPasswordRegistration.Text.ToString() == this.txtboxConfirmPasswordRegistration.Text.ToString()) { try { string sql = @"insert into login values (" + this.txtNIDRegistration.Text + ", '" + this.txtPasswordRegistration.Text + "', 'citizen');"; int count = this.Da.ExecuteUpdateQuery(sql); CitizenRegistration cr = new CitizenRegistration(this, h); cr.Visible = true; this.Visible = false; } catch (Exception ex) { MessageBox.Show("Exception Occured:" + ex); } } else { MessageBox.Show("Password Not Matched"); } } }