private void NewBrAdminBtn_Click(object sender, EventArgs e) { if (ContactNo.Text == String.Empty || EmailId.Text == String.Empty || NewBrAdminpassword.Text == String.Empty) { MessageBox.Show("Fill all Fields", "Required", MessageBoxButtons.OK, MessageBoxIcon.Error); } else { biller.Branch_ID = br_Id[addcombobranch.SelectedIndex]; biller.Contact = ContactNo.Text; biller.Email = EmailId.Text; biller.DOB = NewBrAdminDOB.Value; biller.Password = NewBrAdminpassword.Text; ServiceBiller.Biller data = new ServiceBiller.Biller(); data = s.addBiller(biller); if (data != null) { MessageBox.Show("admin added successfully", "info!", MessageBoxButtons.OK, MessageBoxIcon.Information); brBillderdata.Refresh(); All.BringToFront(); } else { MessageBox.Show("try again some thing wents wrong", "info!", MessageBoxButtons.OK, MessageBoxIcon.Error); } } }
private void editprofilebtn_Click(object sender, EventArgs e) { ServiceBiller.Biller biller = new ServiceBiller.Biller(); biller.Id = UserInfo.id; biller.Branch_ID = UserInfo.branch_id; biller.Email = billeremail.Text; biller.Contact = contactcontact.Text; biller.DOB = billlerdob.Value; if (billerpassword.Text == confirmpassword.Text) { biller.Password = billerpassword.Text; ServiceBiller.Billerdata data = new ServiceBiller.Billerdata(); data = a.updateBiller(biller); if (data != null) { MessageBox.Show("Updated", "updated", MessageBoxButtons.OK, MessageBoxIcon.Information); confirmpassword.Text = ""; } else { MessageBox.Show("Error", "Info !", MessageBoxButtons.OK, MessageBoxIcon.Error); } } else { MessageBox.Show("Confirm Password and Password not same", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }