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

C# CloudSalesBusiness.ProductsBusiness类代码示例

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

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



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

示例1: ProductDetail

 public ActionResult ProductDetail(string id)
 {
     var model = new ProductsBusiness().GetProductByID(id);
     ViewBag.Model = model;
     ViewBag.BrandList = new ProductsBusiness().GetBrandList(CurrentUser.ClientID);
     ViewBag.UnitList = new ProductsBusiness().GetClientUnits(CurrentUser.ClientID);
     return View();
 }
开发者ID:yunxiaokeji,项目名称:ErDangJia,代码行数:8,代码来源:ProductsController.cs


示例2: AddCategoryAttr

 /// <summary>
 /// 添加分类通用属性
 /// </summary>
 /// <param name="categoryid"></param>
 /// <param name="attrid"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public JsonResult AddCategoryAttr(string categoryid, string attrid, int type)
 {
     bool bl = new ProductsBusiness().AddCategoryAttr(categoryid, attrid, type, OperateIP, CurrentUser.UserID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:17,代码来源:ProductsController.cs


示例3: BrandDetail

        /// <summary>
        /// 品牌详情
        /// </summary>
        /// <returns></returns>
        public ActionResult BrandDetail(string id)
        {
            if (string.IsNullOrEmpty(id))
            {
                return View("Brand");
            }
            Brand model = new ProductsBusiness().GetBrandByBrandID(id);
            ViewBag.Item = model;
            ViewBag.ID = id;

            return View();
        }
开发者ID:rngrofl,项目名称:YXERP,代码行数:16,代码来源:ProductsController.cs


示例4: ChooseDetail

 /// <summary>
 /// 加入购物车详情页
 /// </summary>
 /// <param name="pid"></param>
 /// <param name="did"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public ActionResult ChooseDetail(string pid, string did, int type = 0, string guid = "")
 {
     if (string.IsNullOrEmpty(pid))
     {
         return Redirect("ProductList");
     }
     var model = new ProductsBusiness().GetProductByIDForDetails(pid);
     if (model == null || string.IsNullOrEmpty(model.ProductID))
     {
         return Redirect("ProductList");
     }
     ViewBag.Model = model;
     ViewBag.DetailID = did;
     ViewBag.OrderType = type;
     ViewBag.GUID = guid;
     return View();
 }
开发者ID:healtech,项目名称:YXERP,代码行数:24,代码来源:ProductsController.cs


示例5: GetProductListForShopping

        /// <summary>
        /// 过滤产品
        /// </summary>
        /// <param name="filter"></param>
        /// <returns></returns>
        public JsonResult GetProductListForShopping(string filter)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            FilterProduct model = serializer.Deserialize<FilterProduct>(filter);
            int totalCount = 0;
            int pageCount = 0;

            List<Products> list = new ProductsBusiness().GetFilterProducts(model.CategoryID, model.Attrs, model.BeginPrice, model.EndPrice, model.Keywords, model.OrderBy, model.IsAsc, 20, model.PageIndex, ref totalCount, ref pageCount, CurrentUser.ClientID);
            JsonDictionary.Add("Items", list);
            JsonDictionary.Add("TotalCount", totalCount);
            JsonDictionary.Add("PageCount", pageCount);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:rngrofl,项目名称:YXERP,代码行数:22,代码来源:OrdersController.cs


示例6: ProductDetails

 /// <summary>
 /// 设置子产品
 /// </summary>
 /// <param name="id"></param>
 /// <returns></returns>
 public ActionResult ProductDetails(string id)
 {
     var model = new ProductsBusiness().GetProductByID(id);
     ViewBag.Model = model;
     return View();
 }
开发者ID:healtech,项目名称:YXERP,代码行数:11,代码来源:ProductsController.cs


示例7: ProductAdd

 /// <summary>
 /// 添加产品
 /// </summary>
 /// <returns></returns>
 public ActionResult ProductAdd(string id)
 {
     if (string.IsNullOrEmpty(id))
     {
         var list = new ProductsBusiness().GetChildCategorysByID("", CurrentUser.ClientID);
         ViewBag.Items = list;
         return View("ChooseCategory");
     }
     ViewBag.Model = new ProductsBusiness().GetCategoryDetailByID(id);
     ViewBag.BrandList = new ProductsBusiness().GetBrandList(CurrentUser.ClientID);
     ViewBag.UnitList = new ProductsBusiness().GetClientUnits(CurrentUser.ClientID);
     return View();
 }
开发者ID:healtech,项目名称:YXERP,代码行数:17,代码来源:ProductsController.cs


示例8: ExportFromProduct

        public ActionResult ExportFromProduct(bool test = false, string model = "", string filleName = "产品", string filter = "")
        {
            JavaScriptSerializer serializer=new JavaScriptSerializer();
            Dictionary<string, ExcelFormatter> dic = new Dictionary<string, ExcelFormatter>();
            FilterProduct qicProduct =  serializer.Deserialize<FilterProduct>(filter);
            Dictionary<string, ExcelModel> listColumn = new Dictionary<string, ExcelModel>();
            if (string.IsNullOrEmpty(filter))
            {
                listColumn = GetColumnForJson("product", ref dic, model, test ? "testexport" : "export", CurrentUser.ClientID);
            }
            else
            {  
                qicProduct = serializer.Deserialize<FilterProduct>(filter);
                listColumn = GetColumnForJson("product", ref dic, !string.IsNullOrEmpty(model) ? model : "Item", test ? "testexport" : "export", CurrentUser.ClientID);
            }
            string ipPath = "";
            var excelWriter = new ExcelWriter();
            foreach (var key in listColumn)
            {
                excelWriter.Map(key.Key, key.Value.Title);
            }
            byte[] buffer;
            DataTable dt = new DataTable();
            //模版导出
            if (test)
            {
                DataRow dr = dt.NewRow();
                foreach (var key in listColumn)
                {
                    DataColumn dc1 = new DataColumn(key.Key, Type.GetType("System.String"));
                    dt.Columns.Add(dc1); 
                    dr[key.Key] = key.Value.DefaultText; 
                }
                dt.Rows.Add(dr);
            }
            else
            {
                int totalCount = 0;
                int pageCount = 0; 
                ipPath= Server.MapPath("~");
                dt = new ProductsBusiness().GetProductListDataTable(qicProduct.CategoryID, qicProduct.BeginPrice, qicProduct.EndPrice, qicProduct.Keywords, qicProduct.OrderBy, qicProduct.IsAsc, PageSize, qicProduct.PageIndex, ref totalCount, ref pageCount, CurrentUser.ClientID);

            }
            buffer = excelWriter.Write(dt, dic, ipPath);
            var fileName = filleName + (test ? "导入模版" : "")+DateTime.Now.ToString("yyyyMMdd");
            if (!Request.ServerVariables["http_user_agent"].ToLower().Contains("firefox"))
                fileName = HttpUtility.UrlEncode(fileName);
            this.Response.AddHeader("content-disposition", "attachment;filename=" + fileName + ".xlsx");
            return File(buffer, "application/ms-excel");

        }
开发者ID:yunxiaokeji,项目名称:ErDangJia,代码行数:51,代码来源:ProductsController.cs


示例9: UpdateProductStatus

 /// <summary>
 /// 编辑产品状态
 /// </summary>
 /// <param name="productid"></param>
 /// <param name="status"></param>
 /// <returns></returns>
 public JsonResult UpdateProductStatus(string productid, int status)
 {
     bool bl = new ProductsBusiness().UpdateProductStatus(productid, (EnumStatus)status, OperateIP, CurrentUser.UserID);
     JsonDictionary.Add("Status", bl);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:16,代码来源:ProductsController.cs


示例10: ChooseDetail

 /// <summary>
 /// 加入购物车详情页
 /// </summary>
 /// <param name="pid"></param>
 /// <param name="did"></param>
 /// <param name="type"></param>
 /// <returns></returns>
 public ActionResult ChooseDetail(string pid, string did, int type = 0)
 {
     var model = new ProductsBusiness().GetProductByIDForDetails(pid);
     ViewBag.Model = model;
     ViewBag.DetailID = did;
     ViewBag.OrderType = type;
     return View();
 }
开发者ID:rngrofl,项目名称:YXERP,代码行数:15,代码来源:ProductsController.cs


示例11: SavaProduct

        /// <summary>
        /// 保存产品
        /// </summary>
        /// <param name="product"></param>
        /// <returns></returns>
        public JsonResult SavaProduct(string product)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            Products model = serializer.Deserialize<Products>(product);

            if (!string.IsNullOrEmpty(model.AttrList))
            {
                model.AttrList = model.AttrList.Substring(0, model.AttrList.Length - 1);
            }
            if (!string.IsNullOrEmpty(model.ValueList))
            {
                model.ValueList = model.ValueList.Substring(0, model.ValueList.Length - 1);
            }
            if (!string.IsNullOrEmpty(model.AttrValueList))
            {
                model.AttrValueList = model.AttrValueList.Substring(0, model.AttrValueList.Length - 1);
            }

            string id = "";
            if (string.IsNullOrEmpty(model.ProductID))
            {
                id = new ProductsBusiness().AddProduct(model.ProductCode, model.ProductName, model.GeneralName, model.IsCombineProduct.Value == 1, model.BrandID, model.BigUnitID, model.SmallUnitID,
                                                        model.BigSmallMultiple.Value, model.CategoryID, model.Status.Value, model.AttrList, model.ValueList, model.AttrValueList,
                                                        model.CommonPrice.Value, model.Price, model.Weight.Value, model.IsNew.Value == 1, model.IsRecommend.Value == 1, model.IsAllow, model.IsAutoSend, model.EffectiveDays.Value,
                                                        model.DiscountValue.Value, model.ProductImage, model.ShapeCode, model.Description, model.ProductDetails, CurrentUser.UserID, CurrentUser.ClientID);
            }
            else
            {
                bool bl = new ProductsBusiness().UpdateProduct(model.ProductID,model.ProductCode, model.ProductName, model.GeneralName, model.IsCombineProduct.Value == 1, model.BrandID, model.BigUnitID, model.SmallUnitID,
                                                        model.BigSmallMultiple.Value, model.Status.Value, model.CategoryID, model.AttrList, model.ValueList, model.AttrValueList,
                                                        model.CommonPrice.Value, model.Price, model.Weight.Value, model.IsNew.Value == 1, model.IsRecommend.Value == 1, model.IsAllow, model.IsAutoSend, model.EffectiveDays.Value,
                                                        model.DiscountValue.Value, model.ProductImage, model.ShapeCode, model.Description, CurrentUser.UserID, CurrentUser.ClientID);
                if (bl)
                {
                    id = model.ProductID;
                }
            }
            JsonDictionary.Add("ID", id);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:healtech,项目名称:YXERP,代码行数:49,代码来源:ProductsController.cs


示例12: GetBrandList

 public JsonResult GetBrandList(string keyWords, int pageSize, int pageIndex, int totalCount)
 {
     int pageCount = 0;
     List<Brand> list = new ProductsBusiness().GetBrandList(keyWords, pageSize, pageIndex, ref totalCount, ref pageCount, CurrentUser.ClientID);
     JsonDictionary.Add("Items", list);
     JsonDictionary.Add("TotalCount", totalCount);
     JsonDictionary.Add("PageCount", pageCount);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:13,代码来源:ProductsController.cs


示例13: GetBrandDetail

 public JsonResult GetBrandDetail(string id)
 {
     Brand model = new ProductsBusiness().GetBrandByBrandID(id);
     JsonDictionary.Add("model", model);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:10,代码来源:ProductsController.cs


示例14: GetAttrsByCategoryID

        /// <summary>
        /// 获取所有属性
        /// </summary>
        /// <returns></returns>
        public JsonResult GetAttrsByCategoryID(string categoryid)
        {
            List<ProductAttr> list = new List<ProductAttr>();
            list = new ProductsBusiness().GetAttrList(categoryid, CurrentUser.ClientID);

            JsonDictionary.Add("Items", list);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:healtech,项目名称:YXERP,代码行数:16,代码来源:ProductsController.cs


示例15: GetAttrList

        /// <summary>
        /// 获取属性列表
        /// </summary>
        /// <param name="index"></param>
        /// <param name="keyWorks"></param>
        /// <returns></returns>
        public JsonResult GetAttrList(int index, string keyWorks)
        {
            List<ProductAttr> list = new List<ProductAttr>();

            int totalCount = 0, pageCount = 0;
            list = new ProductsBusiness().GetAttrList("", keyWorks, PageSize, index, ref totalCount, ref pageCount, CurrentUser.AgentID, CurrentUser.ClientID);

            JsonDictionary.Add("Items", list);
            JsonDictionary.Add("TotalCount", totalCount);
            JsonDictionary.Add("PageCount", pageCount);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:healtech,项目名称:YXERP,代码行数:22,代码来源:ProductsController.cs


示例16: GetAttrByID

 /// <summary>
 /// 获取属性详情
 /// </summary>
 /// <param name="attr"></param>
 /// <returns></returns>
 public JsonResult GetAttrByID(string attrID = "")
 {
     if (string.IsNullOrEmpty(attrID))
     {
         JsonDictionary.Add("Item", null);
     }
     else
     {
         var model = new ProductsBusiness().GetProductAttrByID(attrID, CurrentUser.ClientID);
         JsonDictionary.Add("Item", model);
     }
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:22,代码来源:ProductsController.cs


示例17: DeleteCategory

 public JsonResult DeleteCategory(string id)
 {
     int result = 0;
     bool bl = new ProductsBusiness().DeleteCategory(id,CurrentUser.UserID,OperateIP,CurrentUser.AgentID,CurrentUser.ClientID,out result);
     JsonDictionary.Add("status", result);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:11,代码来源:ProductsController.cs


示例18: SavaBrand

        public JsonResult SavaBrand(string brand)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            Brand model = serializer.Deserialize<Brand>(brand);

            string brandID = "";
            if (string.IsNullOrEmpty(model.BrandID))
            {
                brandID = new ProductsBusiness().AddBrand(model.Name, model.AnotherName, model.IcoPath, model.CountryCode, model.CityCode, model.Status.Value, model.Remark, model.BrandStyle, OperateIP, CurrentUser.UserID, CurrentUser.ClientID);
            }
            else
            {
                bool bl = new ProductsBusiness().UpdateBrand(model.BrandID, model.Name, model.AnotherName, model.CountryCode, model.CityCode, model.IcoPath, model.Status.Value, model.Remark, model.BrandStyle, OperateIP, CurrentUser.UserID);
                if (bl)
                {
                    brandID = model.BrandID;
                }
            }
            JsonDictionary.Add("ID", brandID);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:healtech,项目名称:YXERP,代码行数:25,代码来源:ProductsController.cs


示例19: SavaCategory

 /// <summary>
 /// 保存分类
 /// </summary>
 /// <param name="category"></param>
 /// <param name="attrlist"></param>
 /// <returns></returns>
 public JsonResult SavaCategory(string category, string attrlist, string saleattr)
 {
     JavaScriptSerializer serializer = new JavaScriptSerializer();
     Category model = serializer.Deserialize<Category>(category);
     //参数
     if (!string.IsNullOrEmpty(attrlist))
     {
         attrlist = attrlist.Substring(0, attrlist.Length - 1);
     }
     //规格
     if (!string.IsNullOrEmpty(saleattr))
     {
         saleattr = saleattr.Substring(0, saleattr.Length - 1);
     }
     string caregoryid = "";
     if (string.IsNullOrEmpty(model.CategoryID))
     {
         caregoryid = new ProductsBusiness().AddCategory(model.CategoryCode, model.CategoryName, model.PID, model.Status.Value, attrlist.Split(',').ToList(), saleattr.Split(',').ToList(), model.Description, CurrentUser.UserID, CurrentUser.ClientID);
     }
     else
     {
         bool bl = new ProductsBusiness().UpdateCategory(model.CategoryID, model.CategoryName, model.Status.Value, attrlist.Split(',').ToList(), saleattr.Split(',').ToList(), model.Description, CurrentUser.UserID);
         if (bl)
         {
             caregoryid = model.CategoryID;
         }
     }
     JsonDictionary.Add("ID", caregoryid);
     return new JsonResult
     {
         Data = JsonDictionary,
         JsonRequestBehavior = JsonRequestBehavior.AllowGet
     };
 }
开发者ID:healtech,项目名称:YXERP,代码行数:40,代码来源:ProductsController.cs


示例20: SaveAttr

        /// <summary>
        /// 保存属性
        /// </summary>
        /// <param name="attr"></param>
        /// <returns></returns>
        public JsonResult SaveAttr(string attr)
        {
            JavaScriptSerializer serializer = new JavaScriptSerializer();
            ProductAttr model = serializer.Deserialize<ProductAttr>(attr);

            string attrID = string.Empty;
            if (string.IsNullOrEmpty(model.AttrID))
            {
                attrID = new ProductsBusiness().AddProductAttr(model.AttrName, model.Description, model.CategoryID, model.Type, CurrentUser.UserID, CurrentUser.ClientID);
            }
            else if (new ProductsBusiness().UpdateProductAttr(model.AttrID, model.AttrName, model.Description, OperateIP, CurrentUser.UserID, CurrentUser.ClientID))
            {
                attrID = model.AttrID.ToString();
            }

            JsonDictionary.Add("ID", attrID);
            return new JsonResult
            {
                Data = JsonDictionary,
                JsonRequestBehavior = JsonRequestBehavior.AllowGet
            };
        }
开发者ID:healtech,项目名称:YXERP,代码行数:27,代码来源:ProductsController.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# CloudSalesDAL.ProductsDAL类代码示例发布时间:2022-05-24
下一篇:
C# Excel.XLWorkbook类代码示例发布时间: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