Exemple #1
0
        public ActionResult Index()
        {
            try
            {
                var customerId = CustomerId();
                if (customerId == 0)
                {
                    return(Redirect("/Me/JoinUs/Index"));
                }
                ViewData["CustomerName"] = CustomerName();
                ViewData["WeixinUser"]   = WeiXinUser();
                LogManager.GetLogger().Info("customerId:" + customerId);

                ViewData["CustoemrBase"] = CustomerBase.FindById(customerId);

                var customerCards = CustomerCard.FindByList(customerId: customerId);
                ViewData["CustomerCards"] = customerCards;

                var orderBases = OrderBaseInfo.FindByList(customerId: customerId);
                ViewData["OrderBases"] = orderBases;

                ViewData["CustomerBases"] = CustomerBase.FindByList(parentId: customerId);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger().Error(ex);
            }
            return(View());
        }
Exemple #2
0
        /// <summary>
        /// 我的提成
        /// </summary>
        /// <returns></returns>
        public ActionResult SalesCommissions()
        {
            try
            {
                var customerId = CustomerId();
                ViewData["CustomerName"] = CustomerName();
                ViewData["WeixinUser"]   = WeiXinUser();

                ViewData["CustomerBase"] = CustomerBase.FindById(customerId);

                var customerBases = CustomerBase.FindByList(parentId: customerId);

                var orderBases = OrderBaseInfo.FindByList();
                orderBases = orderBases.Where(p => customerBases.Any(c => c.Id == p.CustomerId)).ToList();

                ViewData["OrderBases"] = orderBases;

                ViewData["CustomerOrderCommissions"] = CustomerOrderCommission.FindByList(customerId: customerId);

                ViewData["CustomerWithdrawalRecords"] = CustomerWithdrawalRecord.FindByList(customerId: customerId);
            }
            catch (Exception ex)
            {
                LogManager.GetLogger().Error(ex);
            }
            return(View());
        }
Exemple #3
0
 public ActionResult PersonalInformation1(int customerId)
 {
     try
     {
         ViewData["CustomerBase"] = CustomerBase.FindById(customerId);
     }
     catch (Exception ex)
     {
         LogManager.GetLogger().Error(ex);
     }
     return(View());
 }
Exemple #4
0
 public ActionResult PersonalInformation(int customerId)
 {
     try
     {
         ViewData["CustomerBase"] = CustomerBase.FindById(customerId);
         ViewData["Industries"]   = DictionaryBase.FindByList(ConstValue.Catalog.IndustryId, true);
     }
     catch (Exception ex)
     {
         LogManager.GetLogger().Error(ex);
     }
     return(View());
 }
Exemple #5
0
 public ActionResult Withdrawal()
 {
     try
     {
         var customerId = CustomerId();
         ViewData["CustomerName"] = CustomerName();
         ViewData["WeixinUser"]   = WeiXinUser();
         ViewData["CustomerBase"] = CustomerBase.FindById(customerId);
     }
     catch (Exception ex)
     {
         LogManager.GetLogger().Error(ex);
     }
     return(View());
 }
Exemple #6
0
        public ActionResult Index()
        {
            try
            {
                ViewData["CustomerName"] = CustomerName();
                ViewData["WeixinUser"]   = WeiXinUser();
                var customerId = CustomerId();
                ViewData["CustomerBase"] = CustomerBase.FindById(customerId);
                LogManager.GetLogger().Info("customerId:" + customerId);

                ViewData["Trains"] = Train.FindByList();
            }
            catch (Exception ex)
            {
                LogManager.GetLogger().Error(ex);
            }
            return(View());
        }
        public ActionResult LineList(int?suitableTypeId = null, int?productCategoryId = null, int?destId = null)
        {
            try
            {
                ViewData["CustomerName"] = CustomerName();
                ViewData["WeixinUser"]   = WeiXinUser();
                var customerId = CustomerId().ToString();
                LogManager.GetLogger().Info("customerId:" + customerId);

                var productLines = ProductLine.FindByList(suitableTypeId: suitableTypeId,
                                                          productCategoryId: productCategoryId);
                if (null != productLines && null != destId)
                {
                    productLines =
                        productLines.Where(p => null != p.LineDests && p.LineDests.Any(l => l.Id == destId.Value))
                        .ToList();
                }

                ViewData["ProductLines"] = productLines;
                ViewData["CustomerId"]   = customerId;

                ViewData["CustomerBase"] = CustomerBase.FindById(int.Parse(customerId));

                ViewData["SuitableTypeId"]    = suitableTypeId ?? 0;
                ViewData["ProductCategoryId"] = productCategoryId ?? 0;
                ViewData["DestId"]            = destId ?? 0;

                ViewData["ProductCategories"] = DictionaryBase.FindByList(ConstValue.Catalog.ProductCategoryId, true);
                ViewData["DestinationBases"]  =
                    DestinationBase.FindByList(
                        destinationTypeIds: ConstValue.Catalog.DestinationType.Continent.ToString());
            }
            catch (Exception ex)
            {
                LogManager.GetLogger().Error(ex);
            }
            return(View());
        }