コード例 #1
0
 protected void btn_login_Click(object sender, EventArgs e)
 {
     dt = objaccess.CustomerLogin(txtusername.Text, txtpassword.Text);
     if (dt.Rows.Count > 0)
     {
         Session["CustomerID"]   = Convert.ToString(dt.Rows[0]["CustomerID"]);
         Session["CustomerName"] = Convert.ToString(dt.Rows[0]["UserName"]);
         Session["memberid"]     = Convert.ToString(dt.Rows[0]["memberid"]);
         fillcart();
     }
     else
     {
         Page.ClientScript.RegisterStartupScript(Page.GetType(), "validation", "<script language='javascript'>alert(' Invalid User  Name Or Password !');</script>");
     }
 }
コード例 #2
0
    protected void btn_accountsave_Click(object sender, EventArgs e)
    {
        dt = objcustomer.CustomerLogin(txt_MEMBERID.Text, txt_password.Text);
        if (dt.Rows.Count > 0)
        {
            if (txt_MEMBERID.Text != "" && txt_Amount.Text != "" && txt_narration.Text != "")
            {
                DataTable dtcus = objdataaccess.GetDatatable("select * from tblCustomer where memberid='" + txt_MEMBERID.Text + "' ");
                if (dtcus.Rows.Count > 0)
                {
                    hidden_member.Value = dtcus.Rows[0]["CustomerID"].ToString();
                }
                DataTable dts = objdataaccess.GetDatatable("select * from tblCustomer where memberid='" + txt_transmember.Text + "' ");
                if (dts.Rows.Count > 0)
                {
                    hiddencustomer.Value = dts.Rows[0]["CustomerID"].ToString();
                }

                txt_narration.Text = "GiveCredit/" + txt_narration.Text;
                objdataaccess.ExecuteQuery("Exec Proc__WalletTransaction '" + hidden_member.Value + "','-" + txt_Amount.Text + "','Dr','" + txt_narration.Text + "'");

                objdataaccess.ExecuteQuery("Exec Proc__WalletTransaction '" + hiddencustomer.Value + "','" + txt_Amount.Text + "','Cr','" + txt_narration.Text + "'");

                Page.ClientScript.RegisterStartupScript(Page.GetType(), "validation", "<script language='javascript'>alert('Success| Successfully Credit   !');location.replace('MoneyTransfer.aspx');</script>");
            }
            else
            {
                Page.ClientScript.RegisterStartupScript(Page.GetType(), "validation", "<script language='javascript'>alert('Please Select & Enter Mondatory(*) Field !');</script>");
            }
        }
    }
コード例 #3
0
 protected void btnLogin_Click(object sender, EventArgs e)
 {
     dt = objCustomer.CustomerLogin(txtEmail.Text, txtPassword.Text);
     if (dt.Rows.Count > 0)
     {
         Session["customerID"]   = Convert.ToString(dt.Rows[0]["CustomerID"]);
         Session["customerName"] = Convert.ToString(dt.Rows[0]["UserName"]);
         Response.Redirect("Welcome.aspx");
     }
     else
     {
         lblMessage.Text = "Please enter valid email and password";
     }
 }
コード例 #4
0
    protected void btnLoginNext_Click(object sender, EventArgs e)
    {
        dt = objCustomer.CustomerLogin(txtEmail.Text, txtPassword.Text);
        if (dt.Rows.Count > 0)
        {
            Session["customerID"]   = Convert.ToString(dt.Rows[0]["CustomerID"]).Trim();
            Session["customerName"] = Convert.ToString(dt.Rows[0]["FirstName"]);
            txtAddress.Text         = Convert.ToString(dt.Rows[0]["Address"]);
            txtLandmark.Text        = "";
            fillddlCountry();
            ddlCountry.SelectedValue = Convert.ToString(dt.Rows[0]["CountryID"]);
            fillddlState(Convert.ToInt32(ddlCountry.SelectedValue));
            ddlState.SelectedValue = Convert.ToString(dt.Rows[0]["StateID"]);
            txtCity.Text           = Convert.ToString(dt.Rows[0]["City"]);
            txtZip.Text            = Convert.ToString(dt.Rows[0]["ZIP"]).Trim();

            MultiView1.ActiveViewIndex = 1;
            //  CustomerID, FirstName, LastName, Email, ContactNo1, ContactNo2, ImageUrl, Password, Address, Country, State, City, ZIP, IPAddress, Remark, AddDate, LastUpdate, IsActive, CountryID, StateID, CityID
        }
        else
        {
            lblMessage.Text = "Please enter valid email and password";
        }
    }