public bool LoginValidate(logindetails L) { List <SqlParameter> L1 = new List <SqlParameter>(); SqlParameter P = null; P = new SqlParameter("@username", L.username); L1.Add(P); P = new SqlParameter("@password", L.password); L1.Add(P); bool B = DBOperations.loginValidate("sp_loginvalidate", L1); return(B); }
public ActionResult Doctormaster(string CC) { string LoginParams = string.Empty; logindetails lstcompdetails = new logindetails(); if (!string.IsNullOrEmpty(CC)) { lstcompdetails = null; byte[] EncodedLoginParams = Convert.FromBase64String(CC); string DecodedLoginParams = Encoding.UTF8.GetString(EncodedLoginParams); string[] lstQueryString = DecodedLoginParams.Split('&'); ViewBag.Company_Code = lstQueryString[0].Split('=')[1]; ViewBag.User_Code = lstQueryString[1].Split('=')[1]; ViewBag.Region_Code = lstQueryString[2].Split('=')[1]; if (!string.IsNullOrEmpty(lstQueryString[3])) { ViewBag.Source = lstQueryString[3].Split('=')[1]; } else { ViewBag.Source = ""; } if (!string.IsNullOrEmpty(lstQueryString[4])) { ViewBag.DoctorName = lstQueryString[4].Split('=')[1]; } else { ViewBag.DoctorName = ""; } if (!string.IsNullOrEmpty(lstQueryString[5])) { ViewBag.SpecialityCode = lstQueryString[5].Split('=')[1]; } else { ViewBag.SpecialityCode = ""; } } return(View()); }
protected void Button1_Click(object sender, EventArgs e) { logindetails ld = new logindetails(); ld.username = customerid.Text; ld.password = password.Text; LoginBO LB = new LoginBO(); bool b = LB.LoginValidate(ld); if (b) { Session["User"] = customerid.Text; Response.Redirect("flightsearch.aspx"); } else { Label1.Text = "Invalid Username/Password..."; } }