示例#1
0
 //internal static DataTable DELETE_CARTITEM(string PRODUCTID)
 //{
 //    DataTable dt = BLL.ExecuteQuery("EXEC USP_PRODUCT @OPERATION='DELETE_CARTITEM',@PRODUCT_ID='" + PRODUCTID + "'");
 //    return dt;
 //}
 //internal static DataTable GETPRODUCT_CART(string PRODUCTID)
 //{
 //    DataTable dt = BLL.ExecuteQuery("EXEC USP_PRODUCTS @OPERATION='GETPRODUCT_CART',@PRODUCT_ID='" + PRODUCTID + "'");
 //    return dt;
 //}
 internal static bool INSERTADDRESS(SHIPPINGADDRESS obj)
 {
     bool status = false;
     status = BLL.ExecuteNonQuery("EXEC USP_SHIPPINGADDRESS @OPERATION='INSERTCART',@ADD_FIRSTNAME='" + obj.ADD_FIRSTNAME + "',@ADD_EMAILID='" + obj.ADD_EMAILID + "',@ADD_PRIMARYPHONE='" + obj.ADD_PRIMARYPHONE + "',@ADD_ALTERNATEPHONE='" + obj.ADD_ALTERNATEPHONE + "',@ADD_COUNTRY='" + obj.ADD_COUNTRY + "',@ADD_CITY='" + obj.ADD_CITY + "',@ADD_STATE='" + obj.ADD_STATE + "',@ADD_ADDRESS2='" + obj.ADD_ADDRESS + "',@ADD_ADDRESS1='" + obj.ADD_ADDRESS2 + "',@ADD_CREATEDBY =1");
     return status;
 }
        protected void btn_procedchekout_Click(object sender, EventArgs e)
        {
            try
            {

                string startdate = Request.Form["startdate"];
                string enddate = Request.Form["enddate"];

                SHIPPINGADDRESS DA = new SHIPPINGADDRESS();

                DataTable dt_details = new DataTable("DETAILS");
                dt_details.Columns.Add("FRIST_NAME", typeof(string));
                dt_details.Columns.Add("EMAIL_ID", typeof(string));
                dt_details.Columns.Add("PRIMARYPHONE", typeof(string));
                dt_details.Columns.Add("ALTPHONE", typeof(string));
                dt_details.Columns.Add("CITY", typeof(string));
                dt_details.Columns.Add("LOCATION", typeof(string));
                dt_details.Columns.Add("ADDRESS1", typeof(string));
                dt_details.Columns.Add("ADDRESS2", typeof(string));
                dt_details.Columns.Add("PROMOCODE", typeof(string));
                dt_details.Columns.Add("AUDIENCE", typeof(string));
                dt_details.Columns.Add("STARTDATE", typeof(string));
                dt_details.Columns.Add("ENDDATE", typeof(string));

                DataRow column = dt_details.NewRow();
                dt_details.Rows.Add(column);
                column["FRIST_NAME"] = txt_name.Text;
                column["EMAIL_ID"] = txt_email.Text;
                column["PRIMARYPHONE"] = txt_phonenumber.Text;
                column["ALTPHONE"] = txt_altphonenumber.Text;
                column["CITY"] = select_city.Visible.ToString();
                column["LOCATION"] = loc_select.Value;
                column["ADDRESS1"] = txt_addline1.Text;
                column["ADDRESS2"] = txt_addline2.Text;
                column["PROMOCODE"] = txt_promocode.Text;
                column["AUDIENCE"] = txt_audience.Text;
                column["STARTDATE"] = txt_startdate.Text;
                column["ENDDATE"] = txt_enddate.Text;
                Session["DETAILS"] = dt_details;

                if (Session["ZOYALUSER"] != null)
                {

                    //DA.ADD_FIRSTNAME = txt_name.Text;
                    //DA.ADD_ALTERNATEPHONE = DD_EMAILID = txt_email.Text;
                    //DA.ADD_PRIMARYPHONE = txt_phonenumber.Text;
                    //DA.Atxt_altphonenumber.Text;
                    //DA.ADD_COUNTRY = ddlcontry.SelectedItem.ToString();
                    //// DA.ADD_STATE = txt_state.Text;
                    ////  DA.ADD_CITY = txt_city.Text;
                    //DA.ADD_ADDRESS = txt_addline1.Text;
                    //DA.ADD_ADDRESS2 = txt_addline2.Text;
                    //DA.ADD_CREATEDBY = 1;
                    // string[] sessionData = { txt_name.Text, txt_email.Text, txt_phonenumber.Text, txt_altphonenumber.Text, ddlcontry.Text, select_city.InnerText, select_location.InnerText, txt_altphonenumber.Text, txt_addline2.Text };
                    // Session["CART"] = sessionData;

                    //        bool status = BLL.INSERTADDRESS(DA);
                    //    if (status == true)
                    //    {
                    //        BLL.ShowMessage(this, "your successfully inserted");
                    //    // clearcontrol();

                    //    }
                    //    else
                    //    {
                    //        BLL.ShowMessage(this, "contact to admin");
                    //    }
                }
                else
                {
                    // if (lbl_count_item ==0)
                    // {
                    Response.Redirect("logincheck.aspx");
                    // }
                    // else
                    // {
                    //    lbl_proced_msg.Text = "Please select one item";
                    //    // Response.Redirect("shop-cart-full.aspx");

                    //  }

                }

            }
            catch (Exception exe)
            {

            }
        }