PageRenderTime 43ms CodeModel.GetById 16ms RepoModel.GetById 0ms app.codeStats 0ms

/Default.aspx.cs

https://bitbucket.org/xpertech/paycell
C# | 33 lines | 30 code | 2 blank | 1 comment | 1 complexity | 51089dd42a8545036ee8937111f591dd MD5 | raw file
  1. using System;
  2. using System.Collections;
  3. using System.Configuration;
  4. using System.Data;
  5. using System.Linq;
  6. using System.Web;
  7. using System.Web.Security;
  8. using System.Web.UI;
  9. using System.Web.UI.HtmlControls;
  10. using System.Web.UI.WebControls;
  11. using System.Web.UI.WebControls.WebParts;
  12. using System.Xml.Linq;
  13. public partial class _Default : System.Web.UI.Page
  14. {
  15. protected void Page_Load(object sender, EventArgs e)
  16. {
  17. }
  18. protected void btnLogin_Click(object sender, EventArgs e)
  19. {
  20. object uid = SqlHelper.ExecuteScalar(GlobalVariable.con, CommandType.Text, "select UserId from tbl_user where UserName='" + txtUserName.Text + "' and Password='" + txtPassword.Text + "'");
  21. //int userid = Convert.ToInt32(uid.ToString());
  22. if (uid!=null)
  23. {
  24. Response.Redirect("groups.aspx");
  25. }
  26. else
  27. {
  28. lblMessage.Text = "Invalid login details! try again.";
  29. }
  30. }
  31. }