protected void btnLogSubmit_Click(object sender, EventArgs e) { try { ILoginBO objLog = new LoginBO(); Credantials objCred = new Credantials(); objCred.EmailID = txtLogEmailID.Text; objCred.Password = txtLogPassword.Text; AuthLog objAuth = objLog.Authenticate(objCred); if (Session["Invalid"] != null) { lblErrorMsg.Text = Session["Invalid"].ToString(); Session["Invalid"] = null; objAuth.ID = 0; } if (objAuth.ID != 0) { FormsAuthentication.RedirectFromLoginPage("Job", false); Session["Valid"] = objAuth.Type; Session["ID"] = objAuth.ID; if (objAuth.Type == "Seeker") { Response.Redirect("ProfileSeeker.aspx",false); } else { Response.Redirect("ProfileEmployer.aspx",false); } } if (objAuth.ID == 0) { lblErrorMsg.Text = "Invalid EmailID/Password"; } } catch (Exception ex) { lblErrorMsg.Text = "Something Went Wrong in Login Page"+ ex; } }
protected void btnForgetOk_Click(object sender, EventArgs e) { try { string email = txtEmailID.Text; ILoginBO objLog = new LoginBO(); Credantials objCred = new Credantials(); objCred.EmailID = txtLogEmailID.Text; objCred.Password = txtLogPassword.Text; AuthLog objAuth = objLog.AuthPwd(objCred); if (objAuth!=null) { new CCDDLWebService().SendPwdMail(email, objAuth.Type, objAuth.Pwd); } } catch (Exception) { } }