示例#1
0
        public DataTable Select_ProductDataList(Common.ProductDatum dm)
        {
            DataTable dt  = dl.Select_ProductDataList();
            bool      row = false;

            for (int i = 0; i < dt.Rows.Count; i++)
            {
                row = false;
                string   delimitedInfo = dt.Rows[i]["Path"].ToString();
                string[] discreteInfo  = delimitedInfo.Split(new char[] { ',' });
                foreach (string Data in discreteInfo)
                {
                    if (Data == dm.Id_Group.ToString() || dt.Rows[i]["id_group"].ToString() == dm.Id_Group.ToString())
                    {
                        row = true;
                    }
                    else
                    {
                    }
                }
                if (!row)
                {
                    dt.Rows.RemoveAt(i);
                    i--;
                }
            }

            return(dt);
        }
示例#2
0
        public DataTable Select_Product_Search(Common.ProductDatum dm, decimal price1, decimal price2)
        {
            SqlParameter[] prms = new SqlParameter[7];

            string search1 = dm.Title.Replace('ک', 'ك');

            search1 = search1.Replace('ی', 'ي');
            string search2 = dm.Title.Replace('ك', 'ک');

            search2 = search2.Replace('ي', 'ی');
            string search3 = dm.Title.Replace('ک', 'ك');

            search3 = search3.Replace('ي', 'ی');
            string search4 = dm.Title.Replace('ك', 'ک');

            search4 = search4.Replace('ی', 'ي');

            search1 = '%' + search1.Replace(" ", "% ") + '%';
            search2 = '%' + search2.Replace(" ", "% ") + '%';
            search3 = '%' + search3.Replace(" ", "% ") + '%';
            search4 = '%' + search4.Replace(" ", "% ") + '%';

            prms[0] = new SqlParameter("@Id_State", dm.Id_State);
            prms[1] = new SqlParameter("@price1", price1);
            prms[2] = new SqlParameter("@price2", price2);
            prms[3] = new SqlParameter("@search1", search1);
            prms[4] = new SqlParameter("@search2", search2);
            prms[5] = new SqlParameter("@search3", search3);
            prms[6] = new SqlParameter("@search4", search4);
            return(sh.ExecuteDataSet("shop_product_select_search", prms));
        }
示例#3
0
 public void Update_Number_Shop(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[2];
     prms[0] = new SqlParameter("@id", dm.Id);
     prms[1] = new SqlParameter("@number_shop", dm.Number_Shop);
     sh.ExecuteNonQuery("shop_product_update_number_shop", prms);
 }
示例#4
0
 public void Update_Row_View(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[2];
     prms[0] = new SqlParameter("@id", dm.Id);
     prms[1] = new SqlParameter("@row_view", dm.Row_View);
     sh.ExecuteNonQuery("shop_product_update_row_view", prms);
 }
示例#5
0
 public bool Check_Row_View_Exist(Common.ProductDatum dm)
 {
     if (dl.Check_Row_View_Exist(dm).Rows.Count > 1)
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
示例#6
0
        public void Update(Common.ProductDatum dm)
        {
            SqlParameter[] prms = new SqlParameter[16];
            prms[0]  = new SqlParameter("@title", dm.Title);
            prms[1]  = new SqlParameter("@text_short", dm.Text_short);
            prms[2]  = new SqlParameter("@price", dm.Price);
            prms[3]  = new SqlParameter("@text_long", dm.Text_Long);
            prms[4]  = new SqlParameter("@id_group", dm.Id_Group);
            prms[5]  = new SqlParameter("@id_product", dm.Id);
            prms[6]  = new SqlParameter("@pic", dm.Pic);
            prms[7]  = new SqlParameter("@demo", dm.Demo);
            prms[8]  = new SqlParameter("@catalug", dm.Catalug);
            prms[9]  = new SqlParameter("@post_price", dm.Post_Price);
            prms[10] = new SqlParameter("@id_admin", dm.Id_Admin);
            prms[11] = new SqlParameter("@weight", dm.Weight);
            prms[12] = new SqlParameter("@id_state", dm.Id_State);
            prms[13] = new SqlParameter("@rate", dm.Rate);
            prms[14] = new SqlParameter("@MetaKeyword", dm.MetaKeyword);
            prms[15] = new SqlParameter("@MetaDescription", dm.MetaDescription);

            sh.ExecuteNonQuery("shop_product_Update", prms);
        }
示例#7
0
 public void Update_Row_View(Common.ProductDatum dm)
 {
     dl.Update_Row_View(dm);
 }
示例#8
0
 public void Delete(Common.ProductDatum dm)
 {
     dl.Delete(dm);
 }
示例#9
0
 public DataTable Select_Product_Group_Node_SiteMap(Common.ProductDatum dm)
 {
     return(dl.Select_Product_Group_Node_SiteMap(dm));
 }
示例#10
0
 public DataTable Select_Product_State(Common.ProductDatum dm)
 {
     return(dl.Select_Product_State(dm));
 }
示例#11
0
 public DataTable Select_Product_State(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[1];
     prms[0] = new SqlParameter("@Id_State", dm.Id_State);
     return(sh.ExecuteDataSet("shop_product_select_State", prms));
 }
示例#12
0
 public void Update_Number_View(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[1];
     prms[0] = new SqlParameter("@id", dm.Id);
     sh.ExecuteNonQuery("shop_product_update_number_view", prms);
 }
示例#13
0
 public DataTable Check_Row_View_Exist(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[1];
     prms[0] = new SqlParameter("@row_view", dm.Row_View);
     return(sh.ExecuteDataSet("shop_product_check_row_view", prms));
 }
示例#14
0
 public void Delete(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[1];
     prms[0] = new SqlParameter("@id", dm.Id);
     sh.ExecuteNonQuery("shop_product_delete", prms);
 }
示例#15
0
 public DataTable Select_Product_Group_Node_SiteMap(Common.ProductDatum dm)
 {
     SqlParameter[] prms = new SqlParameter[1];
     prms[0] = new SqlParameter("@Id_Group", dm.Id_Group);
     return(sh.ExecuteDataSet("shop_product_select_Group_node_SiteMap", prms));
 }
示例#16
0
 public void Update_Number_View(Common.ProductDatum dm)
 {
     dl.Update_Number_View(dm);
 }
示例#17
0
 public void Update_Number_Shop(Common.ProductDatum dm)
 {
     dl.Update_Number_Shop(dm);
 }
示例#18
0
 public void Update(Common.ProductDatum dm)
 {
     dl.Update(dm);
 }
示例#19
0
 public void Insert(Common.ProductDatum dm)
 {
     dl.Insert(dm);
 }
示例#20
0
 public DataTable Select_Product_Search(Common.ProductDatum dm, decimal price1, decimal price2)
 {
     return(dl.Select_Product_Search(dm, price1, price2));
 }