/// <summary> /// 查询产品类别信息 /// </summary> /// <returns></returns> public ActionResult Single() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); string SnNum = WebUtil.GetFormValue <string>("SnNum"); ProductCategoryProvider provider = new ProductCategoryProvider(CompanyID); ProductCategoryEntity entity = provider.GetSingle(SnNum); DataResult <ProductCategoryEntity> result = new DataResult <ProductCategoryEntity>() { Code = (int)EResponseCode.Success, Message = "响应成功", Result = entity }; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult Add() { string cateNum = WebUtil.GetQueryStringValue <string>("cateNum", string.Empty); ProductCategoryEntity entity = null; if (!cateNum.IsEmpty()) { ProductCategoryProvider provider = new ProductCategoryProvider(); entity = provider.GetSingle(cateNum); } entity = entity.IsNull() ? new ProductCategoryEntity() : entity; ViewBag.Category = entity; return(View()); }
/// <summary> /// 查询类别信息 /// </summary> /// <param name="cateNum"></param> /// <returns></returns> public ProductCategory_CE GetSingle(string cateNum) { if (cateNum.IsEmpty()) { return(null); } ProductCategoryProvider provider = new ProductCategoryProvider(); ProductCategoryEntity entity = provider.GetSingle(cateNum); if (entity.IsNotNull()) { ProductCategory_CE ce = ProductCategory_To.ToCE(entity); return(ce); } return(null); }