protected void btnRegister_Click(object sender, EventArgs e) { try { UserBo objBo = new UserBo(); objBo.UserId = txtSignupUserId.Text.Trim(); objBo.Password = txtSignupPwd.Text.Trim(); //objBo.CnfPassword = txtConfirmPassword.Text.Trim(); objBo.FirstName = txtfname.Text.Trim(); objBo.LastName = txtlname.Text.Trim(); objBo.DOB = txtdob.Text.Trim(); objBo.Institute = ddlinstitute.SelectedValue; objBo.EmailId = txtEmailID.Text; int Result = objreg.InsertStudentDet(objBo); if (Result > 0) { lblMessage.Text = "Registration Successfully Completed"; clearControls(pnlReg); } else { lblMessage.Text = "Error occur while registration"; } } catch (Exception) { throw; } }
protected void btnSubmit_Click(object sender, EventArgs e) { var user = new UserBo() { Address = txtPerminentAddress.Text, CourseId = Convert.ToInt32(ddlCourse.SelectedValue), CourseName = ddlCourse.SelectedItem.Text, CourserType = Convert.ToInt32(ddlCourseType.SelectedValue), DOB = txtDOB.Text, EmailId = txtEmailId.Text, FirstName = txtFirstNAme.Text, Hometown = txtHomeTown.Text, Image = fluImage.FileBytes, InstituteID = Convert.ToInt32(ddlInstitute.SelectedValue), LastName = txtLastName.Text, MobileNo = txtMobileNo.Text, Password = txtPassword.Text, RollNo = txtRollNo.Text, SemisterId = Convert.ToInt32(ddlSemisters.SelectedValue), TeamId = Convert.ToInt32(hdnTeamdID.Value), TeamName = txtTeamName.Text, UserName = "", OtherCourse = txtCourseOther.Text }; int userId = Convert.ToInt32(Session["UserId"]); if (btnSubmit.Text.ToLower() == "update") { MSG = "Profile updation successfully completed"; _regDal.InsertStudentDet(user, Convert.ToInt32(userId)); } else { _regDal.InsertStudentDet(user, 0); } Page.ClientScript.RegisterStartupScript(this.GetType(), "CallMyFunction", "Redirection()", true); }