/// <summary> /// 查询供应商信息 /// </summary> /// <returns></returns> public ActionResult Single() { string CompanyID = WebUtil.GetFormValue <string>("CompanyID"); string SnNum = WebUtil.GetFormValue <string>("SnNum"); SupplierProvider provider = new SupplierProvider(CompanyID); SupplierEntity entity = provider.GetSupplier(SnNum); DataResult <SupplierEntity> result = new DataResult <SupplierEntity>() { Code = (int)EResponseCode.Success, Message = "响应成功", Result = entity }; return(Content(JsonHelper.SerializeObject(result))); }
public ActionResult AddSupplier() { string SupNum = WebUtil.GetQueryStringValue <string>("SupNum"); if (SupNum.IsEmpty()) { ViewBag.Supplier = new SupplierEntity(); ViewBag.SupType = EnumHelper.GetOptions <ESupType>((int)ESupType.Invented, "请选择供应商类型"); return(View()); } else { SupplierProvider provider = new SupplierProvider(); SupplierEntity entity = provider.GetSupplier(SupNum); entity = entity == null ? new SupplierEntity() : entity; ViewBag.SupType = EnumHelper.GetOptions <ESupType>(entity.SupType, "请选择供应商类型"); ViewBag.Supplier = entity; return(View()); } }