コード例 #1
0
    public void CallConnection()
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select(Email_id.Text, "", txtRecoveryHint.Text, "ChkHint");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows[0]["Code"].ToString() == "200")
            {
                Session["Login"]     = ds.Tables[0].Rows[0]["Login"].ToString();
                confirm_pass.Visible = true;
                new_pass.Visible     = true;
                newpass.Visible      = true;
                conpass.Visible      = true;
                change.Visible       = true;
                pnlFP.Visible        = pnlFP.Enabled = false;
            }
            else if (ds.Tables[0].Rows[0]["Code"].ToString() == "404")
            {
                confirm_pass.Visible = false;
                new_pass.Visible     = false;
                newpass.Visible      = false;
                conpass.Visible      = false;
                change.Visible       = false;
                pnlFP.Visible        = pnlFP.Enabled = true;
                lblError.Text        = ds.Tables[0].Rows[0]["Message"].ToString();
            }
        }
    }
コード例 #2
0
    public void CallConnection()
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select(txtLoginId.Text, txtPassword.Text, txtPassword.Text, "Login");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows[0]["Code"].ToString() == "200")
            {
                Session["Login"]      = ds.Tables[0].Rows[0]["Login"].ToString();
                Session["CustomerId"] = ds.Tables[0].Rows[0]["CustomerId"].ToString();
                if (txtLoginId.Text == "[email protected]")
                {
                    Response.Redirect("~/Reports/RegisterUserReport.aspx");
                }
                else
                {
                    Response.Redirect("~/Masters/ViewMail.aspx");
                }
            }
            else if (ds.Tables[0].Rows[0]["Code"].ToString() == "404")
            {
                lblError.Text    = ds.Tables[0].Rows[0]["Message"].ToString();
                lblCaptcha.Text  = Guid.NewGuid().ToString().Substring(0, 5);
                txtCaptcha.Text  = "";
                txtPassword.Text = "";
                return;
            }
        }
    }
コード例 #3
0
    public void CallConnection()
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select("spRegisterUserReport");

        if (ds.Tables.Count > 0)
        {
            BindControls.BindGridView(gvwUsers, ds.Tables[0]);
        }
    }
コード例 #4
0
    public void CallConnection1()
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select(Email_id.Text, newpass.Text, "", "ForgotPassword");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows[0]["Code"].ToString() == "200")
            {
                Session["Login"] = ds.Tables[0].Rows[0]["Login"].ToString();
                lblError.Text    = ds.Tables[0].Rows[0]["Message"].ToString();
            }
        }
    }
コード例 #5
0
 public void CallConnection(string MailType)
 {
     if (Session["Data"] == null)
     {
         ClsSqlConnection obj = new ClsSqlConnection();
         DataSet          ds  = obj.Select(int.Parse(Session["CustomerId"].ToString()), MailType);
         if (ds.Tables.Count > 0)
         {
             BindControls.BindGridView(gvwMails, ds.Tables[0]);
         }
     }
     else if (Session["Data"] != null)
     {
         BindControls.BindGridView(gvwMails, (Session["Data"] as DataSet).Tables[0]);
         Session["Data"] = null;
     }
 }
コード例 #6
0
    public void CallConnection()
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select(Session["Login"].ToString(), newpass.Text, currpass.Text, "ChangePassword");

        if (ds.Tables.Count > 0)
        {
            if (ds.Tables[0].Rows[0]["Code"].ToString() == "200")
            {
                Session["Login"] = ds.Tables[0].Rows[0]["Login"].ToString();
                Response.Redirect("~/Masters/ViewMail.aspx");
            }
            else if (ds.Tables[0].Rows[0]["Code"].ToString() == "404")
            {
                lblError.Text = ds.Tables[0].Rows[0]["Message"].ToString();
            }
        }
    }
コード例 #7
0
    public void CallConnection(int id, string MailType)
    {
        ClsSqlConnection obj = new ClsSqlConnection();
        DataSet          ds  = obj.Select(id, MailType);

        Session["Data"] = ds;
        if (MailType == "ReadMail")
        {
            if (ds.Tables.Count > 0)
            {
                BindControls.BindFormView(frmReadMail, ds.Tables[0]);
            }
        }
        else
        {
            Response.Redirect("~/Masters/ViewMail.aspx");
        }
    }