• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# CloudSalesDAL.ProductsDAL类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中CloudSalesDAL.ProductsDAL的典型用法代码示例。如果您正苦于以下问题:C# ProductsDAL类的具体用法?C# ProductsDAL怎么用?C# ProductsDAL使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ProductsDAL类属于CloudSalesDAL命名空间,在下文中一共展示了ProductsDAL类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: AddAttrValue

 /// <summary>
 /// 添加属性值
 /// </summary>
 /// <param name="valueName">值</param>
 /// <param name="attrID">属性ID</param>
 /// <returns></returns>
 public string AddAttrValue(string valueName, string attrID, string operateid, string clientid)
 {
     var valueID = Guid.NewGuid().ToString();
     var dal = new ProductsDAL();
     if (dal.AddAttrValue(valueID, valueName, attrID, operateid, clientid))
     {
         return valueID.ToString();
     }
     return string.Empty;
 }
开发者ID:rngrofl,项目名称:YXERP,代码行数:16,代码来源:ProductsBusiness.cs


示例2: GetBrandList

        public List<Brand> GetBrandList(string keyWords, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID)
        {
            var dal = new ProductsDAL();
            DataSet ds = dal.GetBrandList(keyWords, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);

            List<Brand> list = new List<Brand>();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                Brand model = new Brand();
                model.FillData(dr);
                model.City = CommonBusiness.Citys.Where(c => c.CityCode == model.CityCode).FirstOrDefault();
                list.Add(model);
            }
            return list;
        }
开发者ID:yunxiaokeji,项目名称:ErDangJia,代码行数:15,代码来源:ProductsBusiness.cs


示例3: AddAttrValue

        public string AddAttrValue(string valueName, string attrID, string operateid, string clientid)
        {
            var valueID = Guid.NewGuid().ToString().ToLower();
            var dal = new ProductsDAL();
            if (dal.AddAttrValue(valueID, valueName, attrID, operateid, clientid))
            {
                var model = GetProductAttrByID(attrID, clientid);
                model.AttrValues.Add(new AttrValue()
                {
                    ValueID = valueID,
                    ValueName = valueName,
                    Status = 1,
                    AttrID = attrID,
                    ClientID = clientid,
                    CreateTime = DateTime.Now
                });

                return valueID;
            }
            return string.Empty;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:21,代码来源:ProductsBusiness.cs


示例4: InsertProduct

 public static string InsertProduct(List<Products> list)
 { 
     string mes ="";
     list.ForEach(x =>
     {
         string result = "";
         string pid
             = new ProductsDAL().InsertProductExcel(x.ProductCode, x.ProductName, x.GeneralName, (x.IsCombineProduct == 1), x.BrandID,
             x.BigUnitID,x.UnitID,x.BigSmallMultiple.Value,x.CategoryID,x.Status.Value,x.AttrList,x.ValueList,x.AttrValueList,
             x.CommonPrice.Value,x.Price,x.Weight.Value,(x.IsNew==1),(x.IsRecommend==1),x.IsAllow,x.IsAutoSend,x.EffectiveDays.Value,
             x.DiscountValue.Value, x.WarnCount, x.ProductImage, x.ShapeCode, x.Description, x.CreateUserID, x.ClientID, ref result);
         if (string.IsNullOrEmpty(result))
         {
             LogBusiness.AddActionLog(CloudSalesEnum.EnumSystemType.Client,
                 CloudSalesEnum.EnumLogObjectType.Product, EnumLogType.Create, "", x.CreateUserID, "", x.ClientID);
         }
         else
         {
             mes += result+",";
         }
     });
     return string.IsNullOrEmpty(mes)  ? "" : mes;
 }
开发者ID:yunxiaokeji,项目名称:ErDangJia,代码行数:23,代码来源:ExcelImportBusiness.cs


示例5: UpdateAttrValueStatus

 public bool UpdateAttrValueStatus(string valueid, EnumStatus status, string operateIP, string operateID)
 {
     var dal = new ProductsDAL();
     return dal.UpdateAttrValueStatus(valueid, (int)status);
 }
开发者ID:healtech,项目名称:YXERP,代码行数:5,代码来源:ProductsBusiness.cs


示例6: GetAttrs

        public List<ProductAttr> GetAttrs(string clientid)
        {
            if (ClientAttrs.ContainsKey(clientid))
            {
                return ClientAttrs[clientid];
            }

            List<ProductAttr> list = new List<ProductAttr>();
            DataSet ds = new ProductsDAL().GetAttrs(clientid);
            foreach (DataRow dr in ds.Tables["Attrs"].Rows)
            {
                ProductAttr model = new ProductAttr();
                model.FillData(dr);
                model.AttrValues = new List<AttrValue>();
                foreach (DataRow item in ds.Tables["Values"].Rows)
                {
                    AttrValue attrValue = new AttrValue();
                    attrValue.FillData(item);
                    model.AttrValues.Add(attrValue);
                }
            }
            ClientAttrs.Add(clientid, list);

            return list;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:25,代码来源:ProductsBusiness.cs


示例7: UpdateAttrValue

 public bool UpdateAttrValue(string valueID, string attrid, string valueName, string operateIP, string operateID, string clientid)
 {
     var dal = new ProductsDAL();
     var bl = dal.UpdateAttrValue(valueID, valueName);
     if (bl)
     {
         var model = GetProductAttrByID(attrid, clientid);
         var value = model.AttrValues.Where(m => m.ValueID == valueID).FirstOrDefault();
         value.ValueName = valueName;
     }
     return bl;
 }
开发者ID:healtech,项目名称:YXERP,代码行数:12,代码来源:ProductsBusiness.cs


示例8: UpdateProductDetails

 public bool UpdateProductDetails(string detailid, string productid, string productCode, string shapeCode, decimal bigPrice, string attrlist, string valuelist, string attrvaluelist, decimal price, decimal weight, string description, string productImg, string operateid, string clientid)
 {
     lock (SingleLock)
     {
         if (!string.IsNullOrEmpty(productImg) && productImg.IndexOf(TempPath) >= 0)
         {
             if (productImg.IndexOf("?") > 0)
             {
                 productImg = productImg.Substring(0, productImg.IndexOf("?"));
             }
             FileInfo file = new FileInfo(HttpContext.Current.Server.MapPath(productImg));
             productImg = FILEPATH + file.Name;
             if (file.Exists)
             {
                 file.MoveTo(HttpContext.Current.Server.MapPath(productImg));
             }
         }
         var dal = new ProductsDAL();
         return dal.UpdateProductDetails(detailid, productid, productCode, shapeCode, bigPrice, attrlist, valuelist, attrvaluelist, price, weight, description, productImg);
     }
 }
开发者ID:healtech,项目名称:YXERP,代码行数:21,代码来源:ProductsBusiness.cs


示例9: UpdateUnitStatus

 public bool UpdateUnitStatus(string unitID, EnumStatus status, string operateIP, string operateID)
 {
     var dal = new ProductsDAL();
     return dal.UpdateUnitStatus(unitID, (int)status);
 }
开发者ID:healtech,项目名称:YXERP,代码行数:5,代码来源:ProductsBusiness.cs


示例10: UpdateCategoryAttrStatus

 public bool UpdateCategoryAttrStatus(string categoryid, string attrid, EnumStatus status, int type, string operateIP, string operateID)
 {
     var dal = new ProductsDAL();
     return dal.UpdateCategoryAttrStatus(categoryid, attrid, (int)status, type);
 }
开发者ID:healtech,项目名称:YXERP,代码行数:5,代码来源:ProductsBusiness.cs


示例11: UpdateProductAttr

 public bool UpdateProductAttr(string attrID, string attrName, string description, string operateIP, string operateID,string clientid)
 {
     var dal = new ProductsDAL();
     var bl = dal.UpdateProductAttr(attrID, attrName, description);
     if (bl)
     {
         var model = GetProductAttrByID(attrID, clientid);
         model.AttrName = attrName;
         model.Description = description;
     }
     return bl;
 }
开发者ID:healtech,项目名称:YXERP,代码行数:12,代码来源:ProductsBusiness.cs


示例12: GetClientUnits

        public List<ProductUnit> GetClientUnits(string clientid)
        {
            var dal = new ProductsDAL();
            DataTable dt = dal.GetClientUnits(clientid);

            List<ProductUnit> list = new List<ProductUnit>();
            foreach (DataRow dr in dt.Rows)
            {
                ProductUnit model = new ProductUnit();
                model.FillData(dr);
                list.Add(model);
            }
            return list;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:14,代码来源:ProductsBusiness.cs


示例13: GetFilterProducts

        public List<Products> GetFilterProducts(string categoryid, List<FilterAttr> Attrs, int doctype, string beginprice, string endprice, string keyWords, string orderby, bool isasc, int pageSize, int pageIndex, ref int totalCount, ref int pageCount, string clientID)
        {
            var dal = new ProductsDAL();
            StringBuilder attrbuild = new StringBuilder();
            StringBuilder salebuild = new StringBuilder();
            foreach (var attr in Attrs)
            {
                if (attr.Type == EnumAttrType.Parameter)
                {
                    attrbuild.Append(" and p.ValueList like '%" + attr.ValueID + "%'");
                }
                else if (attr.Type == EnumAttrType.Specification)
                {
                    salebuild.Append(" and AttrValue like '%" + attr.ValueID + "%'");
                }
            }

            DataSet ds = dal.GetFilterProducts(categoryid, attrbuild.ToString(), salebuild.ToString(), doctype, beginprice, endprice, keyWords, orderby, isasc ? 1 : 0, pageSize, pageIndex, ref totalCount, ref pageCount, clientID);

            List<Products> list = new List<Products>();
            foreach (DataRow dr in ds.Tables[0].Rows)
            {
                Products model = new Products();
                model.FillData(dr);
                list.Add(model);
            }
            return list;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:28,代码来源:ProductsBusiness.cs


示例14: GetCategoryDetailByID

        /// <summary>
        /// 获取产品分类详情(包括属性和值)
        /// </summary>
        public Category GetCategoryDetailByID(string categoryid)
        {
            var dal = new ProductsDAL();
            DataSet ds = dal.GetCategoryDetailByID(categoryid);

            Category model = new Category();
            if (ds.Tables.Contains("Category") && ds.Tables["Category"].Rows.Count > 0)
            {
                model.FillData(ds.Tables["Category"].Rows[0]);
                List<ProductAttr> salelist = new List<ProductAttr>();
                List<ProductAttr> attrlist = new List<ProductAttr>();

                foreach (DataRow attr in ds.Tables["Attrs"].Rows)
                {

                    ProductAttr modelattr = new ProductAttr();
                    modelattr.FillData(attr);
                    if (modelattr.Type==1)
                    {
                        attrlist.Add(modelattr);
                    }
                    else if (modelattr.Type == 2)
                    {
                        salelist.Add(modelattr);
                    }
                    modelattr.AttrValues = new List<AttrValue>();
                    foreach (DataRow value in ds.Tables["Values"].Select("AttrID='" + modelattr.AttrID + "'"))
                    {
                        AttrValue valuemodel = new AttrValue();
                        valuemodel.FillData(value);
                        modelattr.AttrValues.Add(valuemodel);
                    }
                }

                model.SaleAttrs = salelist;
                model.AttrLists = attrlist;
            }

            return model;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:43,代码来源:ProductsBusiness.cs


示例15: GetChildCategorysByID

        public List<Category> GetChildCategorysByID(string categoryid, string clientid)
        {
            var dal = new ProductsDAL();
            DataTable dt = dal.GetChildCategorysByID(categoryid, clientid);

            List<Category> list = new List<Category>();

            foreach (DataRow dr in dt.Rows)
            {
                Category model = new Category();
                model.FillData(dr);
                list.Add(model);
            }
            return list;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:15,代码来源:ProductsBusiness.cs


示例16: GetCategoryByID

        /// <summary>
        /// 获取产品分类
        /// </summary>
        public Category GetCategoryByID(string categoryid)
        {
            var dal = new ProductsDAL();
            DataTable dt = dal.GetCategoryByID(categoryid);

            Category model = new Category();
            if (dt.Rows.Count > 0)
            {
                model.FillData(dt.Rows[0]);
            }

            return model;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:16,代码来源:ProductsBusiness.cs


示例17: GetBrandList

        public List<Brand> GetBrandList(string clientID)
        {
            var dal = new ProductsDAL();
            DataTable dt = dal.GetBrandList(clientID);

            List<Brand> list = new List<Brand>();
            foreach (DataRow dr in dt.Rows)
            {
                Brand model = new Brand();
                model.FillData(dr);
                list.Add(model);
            }
            return list;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:14,代码来源:ProductsBusiness.cs


示例18: GetBrandByBrandID

        public Brand GetBrandByBrandID(string brandID)
        {
            var dal = new ProductsDAL();
            DataTable dt = dal.GetBrandByBrandID(brandID);

            Brand model = new Brand();
            if (dt.Rows.Count > 0)
            {
                model.FillData(dt.Rows[0]);
                model.City = CommonBusiness.Citys.Where(c => c.CityCode == model.CityCode).FirstOrDefault();
            }
            return model;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:13,代码来源:ProductsBusiness.cs


示例19: UpdateBrand

 public bool UpdateBrand(string brandID, string name, string anotherName, string countryCode, string cityCode, string icopath, int status, string remark, string brandStyle, string operateIP, string operateID)
 {
     if (!string.IsNullOrEmpty(icopath) && icopath.IndexOf(TempPath) >= 0)
     {
         if (icopath.IndexOf("?") > 0)
         {
             icopath = icopath.Substring(0, icopath.IndexOf("?"));
         }
         FileInfo file = new FileInfo(HttpContext.Current.Server.MapPath(icopath));
         icopath = FILEPATH + file.Name;
         if (file.Exists)
         {
             file.MoveTo(HttpContext.Current.Server.MapPath(icopath));
         }
     }
     var dal = new ProductsDAL();
     return dal.UpdateBrand(brandID, name, anotherName, countryCode, cityCode, status, icopath, remark, brandStyle, operateIP, operateID);
 }
开发者ID:healtech,项目名称:YXERP,代码行数:18,代码来源:ProductsBusiness.cs


示例20: GetProductAttrByID

        public ProductAttr GetProductAttrByID(string attrid, string clientid)
        {
            var list = GetAttrs(clientid);
            if (list.Where(m => m.AttrID == attrid).Count() > 0)
            {
                return list.Where(m => m.AttrID == attrid).FirstOrDefault();
            }
            var dal = new ProductsDAL();
            DataSet ds = dal.GetProductAttrByID(attrid);

            ProductAttr model = new ProductAttr();
            if (ds.Tables.Contains("Attrs") && ds.Tables["Attrs"].Rows.Count > 0)
            {
                model.FillData(ds.Tables["Attrs"].Rows[0]);
                model.AttrValues = new List<AttrValue>();
                foreach (DataRow item in ds.Tables["Values"].Rows)
                {
                    AttrValue attrValue = new AttrValue();
                    attrValue.FillData(item);
                    model.AttrValues.Add(attrValue);
                }
            }

            ClientAttrs[clientid].Add(model);

            return model;
        }
开发者ID:healtech,项目名称:YXERP,代码行数:27,代码来源:ProductsBusiness.cs



注:本文中的CloudSalesDAL.ProductsDAL类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# V2.ComputerSystem类代码示例发布时间:2022-05-24
下一篇:
C# CloudSalesBusiness.ProductsBusiness类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap