示例#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());
        }
    }
示例#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");
    }
示例#3
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());
        }
    }