Git.Storage.Web/Areas/Client/Controllers/CustomerController.cs

(开头部分) 3KB

这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。

using Git.Storage.Web.Lib;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Git.Framework.Controller;
using Git.Framework.DataTypes.ExtensionMethods;
using Git.Storage.Entity.Store;
using Git.Storage.Provider.Client;
using Git.Framework.DataTypes;
using Git.Storage.Common;
using Git.Storage.Web.Lib.Filter;
using Git.Storage.Provider;

namespace Git.Storage.Web.Areas.Client.Controllers
{
    public class CustomerController : MasterPage
    {
        /// <summary>
        /// 客户信息列表
        /// </summary>
        /// <returns></returns>
        [LoginFilter]
        public ActionResult Index()
        {
            ViewBag.DdlCusType = EnumHelper.GetOptions<ECusType>("", "请选择客户类别");
            return View();
        }


        /// <summary>
        /// 添加客户
        /// </summary>
        /// <returns></returns>
        [LoginFilter]
        public ActionResult Add()
        {
            Session[CacheKey.JOOSHOW_CUSADDRESS_CACHE] = null;
            string CusNum = WebUtil.GetQueryStringValue<string>("CusNum", string.Empty);
            if (CusNum.IsEmpty())
            {
                ViewBag.Customer = new CustomerEntity();
                ViewBag.DdlCusType = EnumHelper.GetOptions<ECusType>("","请选择客户类别");
                return View();
            }
            else
            {
                CustomerProvider provider = new CustomerProvider();
                CustomerEntity entity = provider.GetSingleCustomer(CusNum);
                entity = entity == null ? new CustomerEntity() : entity;
                ViewBag.DdlCusType = EnumHelper.GetOptions<ECusType>(entity.CusType, "请选择客户类别");
                ViewBag.Customer = entity;

                List<CusAddressEntity> listResult = provider.GetAddressList(entity.CusNum);
                if (!listResult.IsNullOrEmpty())
                {
                    Session[CacheKey.JOOSHOW_CUSADDRESS_CACHE] = listResult;
                }
                return View();
后面还有 47 行代码,购买后查看完整代码

24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明

AI 解读

登录后可用,每次 10 积分,解读结果公开显示在下面。

还没有人解读过这个文件。