Exemple #1
0
    protected void updateMemberInfoSession()
    {
        DataTable dtUser = new DataTable();

        dtUser = clscon.ReturnDataTable("Login_MembersLogin", new SqlParameter("@Email", txtEmailR.Text.Trim()), new SqlParameter("@Password", ViewState["Password"]));
        if (dtUser.Rows.Count > 0)
        {
            if (dtUser.Rows[0]["memberId"].ToString() == "0")
            {
                //MsgBox("Invalid EmailId or Password");
                //return;
            }
            else
            {
                Session["MemberInfo"] = dtUser;
                //Response.Redirect("MemberDashboard.aspx");
            }
        }
        //update billing info

        clsBSD = new BillingShippingDetails();
        DataTable dtBill = new DataTable();

        dtBill = clsBSD.BindBillShip();

        foreach (DataRow dr in dtUser.Rows)
        {
            if (dtBill.Rows.Count > 0)
            {
                clsBSD.RemoveItem(0);
            }
            clsBSD.AddToBillShipTable(dr["Tinno"].ToString(), dr["Cstno"].ToString(), dr["BCompany"].ToString(), dr["BContact"].ToString(), dr["BAddress1"].ToString(), dr["BAddress2"].ToString(), dr["BCity"].ToString(), dr["BState"].ToString(), dr["BCountry"].ToString(), dr["BZipcode"].ToString(), dr["Name"].ToString(), dr["Email"].ToString(), dr["Company"].ToString(), dr["Contact"].ToString(), dr["Address1"].ToString(), dr["Address2"].ToString(), dr["City"].ToString(), dr["State"].ToString(), dr["Country"].ToString(), dr["Zipcode"].ToString());
        }
    }
Exemple #2
0
    protected void btnConfirm_Click(object sender, EventArgs e)
    {
        DataTable dt = new DataTable();

        dt = getStateCityOnPincode(Convert.ToInt64(txtPincodeS.Text));

        if (dt.Rows.Count <= 0)
        {
            MsgBox("Invalid Pincode in Shipping Address");
            return;
        }

        DataTable dt1 = new DataTable();

        dt1 = getStateCityOnPincode(Convert.ToInt64(txtPincodeB.Text));

        if (dt1.Rows.Count <= 0)
        {
            MsgBox("Invalid Pincode in Billing Address");
            return;
        }

        clsBSD = new BillingShippingDetails();
        DataTable dtBill = new DataTable();

        dtBill = clsBSD.BindBillShip();

        if (dtBill.Rows.Count > 0)
        {
            clsBSD.RemoveItem(0);
        }
        clsBSD.AddToBillShipTable(txtTIN.Text, txtCST.Text, txtCompanyB.Text, txtMobileB.Text, txtAddress1B.Text, txtAddress2B.Text, txtCityB.Text, txtStateB.Text, txtCountryB.Text, txtPincodeB.Text, txtNameS.Text, txtEmailS.Text, txtCompanyS.Text, txtMobileS.Text, txtAddress1S.Text, txtAddress2S.Text, txtCityS.Text, txtStateS.Text, txtCountryS.Text, txtPincodeS.Text);
        Response.Redirect("Checkout_Order.aspx");
    }
Exemple #3
0
    protected void BindShippingInfo()
    {
        clsBSD = new BillingShippingDetails();

        DataTable dtbilship = new DataTable();

        dtbilship = clsBSD.BindBillShip();

        if (dtbilship.Rows.Count <= 0)
        {
            DataTable dtMember = new DataTable();
            dtMember = (DataTable)Session["MemberInfo"];

            foreach (DataRow dr in dtMember.Rows)
            {
                clsBSD.AddToBillShipTable(dr["Tinno"].ToString(), dr["Cstno"].ToString(), dr["BCompany"].ToString(), dr["BContact"].ToString(), dr["BAddress1"].ToString(), dr["BAddress2"].ToString(), dr["BCity"].ToString(), dr["BState"].ToString(), dr["BCountry"].ToString(), dr["BZipcode"].ToString(), dr["Name"].ToString(), dr["Email"].ToString(), dr["Company"].ToString(), dr["Contact"].ToString(), dr["Address1"].ToString(), dr["Address2"].ToString(), dr["City"].ToString(), dr["State"].ToString(), dr["Country"].ToString(), dr["Zipcode"].ToString());
            }
        }
        foreach (DataRow dr in dtbilship.Rows)
        {
            txtEmailS.Text    = dr["SEmail"].ToString();
            txtNameS.Text     = dr["SName"].ToString();
            txtCompanyS.Text  = dr["SCompany"].ToString();
            txtMobileS.Text   = dr["SContact"].ToString();
            txtAddress1S.Text = dr["SAddress1"].ToString();
            txtAddress2S.Text = dr["SAddress2"].ToString();
            txtCityS.Text     = dr["SCity"].ToString();
            txtStateS.Text    = dr["SState"].ToString();
            txtCountryS.Text  = dr["SCountry"].ToString();
            txtPincodeS.Text  = dr["SZipcode"].ToString();
            txtEmailS.Text    = dr["SEmail"].ToString();

            //if (Session["CameAgain"] != null)
            //{
            txtCompanyB.Text  = dr["Company"].ToString();
            txtMobileB.Text   = dr["Contact"].ToString();
            txtAddress1B.Text = dr["Address1"].ToString();
            txtAddress2B.Text = dr["Address2"].ToString();
            txtCityB.Text     = dr["City"].ToString();
            txtStateB.Text    = dr["State"].ToString();
            txtCountryB.Text  = dr["Country"].ToString();
            txtPincodeB.Text  = dr["Zipcode"].ToString();
            //}
            txtTIN.Text = dr["Name"].ToString();
            txtCST.Text = dr["Email"].ToString();
        }
    }
Exemple #4
0
    protected void BindBillingInfo()
    {
        clsBSD = new BillingShippingDetails();
        DataTable dtBill = new DataTable();

        dtBill = clsBSD.BindBillShip();

        DataTable dtMember = new DataTable();

        dtMember = (DataTable)Session["MemberInfo"];

        if (dtBill.Rows.Count > 0)
        {
            clsBSD.RemoveItem(0);
        }
        foreach (DataRow dr in dtMember.Rows)
        {
            clsBSD.AddToBillShipTable(dr["Tinno"].ToString(), dr["Cstno"].ToString(), dr["BCompany"].ToString(), dr["BContact"].ToString(), dr["BAddress1"].ToString(), dr["BAddress2"].ToString(), dr["BCity"].ToString(), dr["BState"].ToString(), dr["BCountry"].ToString(), dr["BZipcode"].ToString(), dr["Name"].ToString(), dr["Email"].ToString(), dr["Company"].ToString(), dr["Contact"].ToString(), dr["Address1"].ToString(), dr["Address2"].ToString(), dr["City"].ToString(), dr["State"].ToString(), dr["Country"].ToString(), dr["Zipcode"].ToString());
        }
    }