protected void btndelete_Click(object sender, EventArgs e) { BusiessLogic bl = new BusiessLogic(); RemDoctor rd = new RemDoctor(); rd.DoctorId = txtdoctor.Text; DialogResult res = MessageBox.Show("Are you sure to delete the record?", "Confirmation", MessageBoxButtons.OKCancel, MessageBoxIcon.Question); if (res == DialogResult.OK) { if (rd.DoctorId == txtdoctor.Text) { //string result = bl.Remove_Doctor(did); //if(result==string.Empty) //{ // MessageBox.Show("Enter valid credentials"); bl.Remove_Doctor(rd.DoctorId); MessageBox.Show("Deletion Successful"); } } else { MessageBox.Show("Enter valid Credentials"); } }
protected void btnRegister_Click(object sender, EventArgs e) { BusiessLogic pbll = new BusiessLogic(); pbll.FirstName = txtFirstName.Text; pbll.LastName = txtLastName.Text; pbll.MobileNumber = txtMobile.Text; pbll.Occupation = txtOccupation.Text; pbll.OrgWorkingFor = txtOrganisationWorking.Text; pbll.Password = txtPassword.Text; pbll.ReasonForHosp = txtReason.Text; pbll.Doj = Convert.ToDateTime(txtJoiningDate.Text); pbll.Address = txtAddress.Text; pbll.UserId = txtuserId.Text; pbll.Email = txtEmail.Text; pbll.Caretakername = txtCareTakerName.Text; foreach (ListItem item in rblGender.Items) { if (item.Selected) { pbll.Gender = rblGender.SelectedValue; } } pbll.Pdal(); MessageBox.Show("Insertion is successfull..!!"); Response.Redirect("~/Home/LoginPage.aspx"); }