Example #1
0
 public ActionResult OrderDeal(int OrderID)
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     DataAPI.CustomerController  apiCust      = new DataAPI.CustomerController();
     ViewBag.OrderList = apiCust.GetOrderDetail(OrderID);
     return(View());
 }
Example #2
0
 // GET: System/ColorSettings
 public ActionResult ColorSettings()
 {
     //获取基本数据
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     ViewBag.ColorList = apiBasecData.GetColor(CurrentUserInfo.CompanyID);
     return(View());
 }
Example #3
0
 // 英雄榜
 public ActionResult HeroList()
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     ViewBag.SourceList = apiBasecData.GetCustomerSource("");
     ViewBag.CarList    = apiBasecData.GetCar();
     return(View());
 }
Example #4
0
 public ActionResult EditColor(int ColorID)
 {
     //获取基本数据
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     ViewBag.ColorList     = apiBasecData.GetColor(CurrentUserInfo.CompanyID, ColorID);
     ViewBag.ColorTypeList = apiBasecData.GetColorType(CurrentUserInfo.CompanyID);
     return(View());
 }
Example #5
0
 public ActionResult Order(int OrderID, string editType = "")
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     DataAPI.CustomerController  apiCust      = new DataAPI.CustomerController();
     ViewBag.OrderList = apiCust.GetOrderDetail(OrderID);
     ViewBag.editType  = editType;
     return(View());
 }
Example #6
0
        // 客户来源分析
        public ActionResult SourceAnalysis()
        {
            //获取基本数据
            DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
            ViewBag.SourceList = apiBasecData.GetCustomerSource("");
            ViewBag.CarList    = apiBasecData.GetCar();

            return(View());
        }
Example #7
0
        // GET: Customer/Create
        public ActionResult Create()
        {
            //获取基本数据
            DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
            ViewBag.SourceList = apiBasecData.GetCustomerSource("");
            ViewBag.CarList    = apiBasecData.GetCar();
            ViewBag.ColorList  = apiBasecData.GetColor(CurrentUserInfo.CompanyID);
            ViewBag.GradeList  = apiBasecData.GetCustomerGrade();

            return(View());
        }
Example #8
0
 // GET: Customer/Details/5
 public ActionResult Details(int id, string editPermission = "YES")
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     DataAPI.CustomerController  apiCust      = new DataAPI.CustomerController();
     ViewBag.SourceList     = apiBasecData.GetCustomerSource("");
     ViewBag.CarList        = apiBasecData.GetCar();
     ViewBag.ColorList      = apiBasecData.GetColor(CurrentUserInfo.CompanyID);
     ViewBag.GradeList      = apiBasecData.GetCustomerGrade();
     ViewBag.CustInfo       = apiCust.GetCustomerObj(id);
     ViewBag.editPermission = editPermission;
     return(View());
 }
Example #9
0
 // GET: Customer/BusinessEdit/5
 public ActionResult CreateBusiness(int id)
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     DataAPI.CustomerController  apiCust      = new DataAPI.CustomerController();
     ViewBag.SourceList = apiBasecData.GetCustomerSource("");
     ViewBag.CarList    = apiBasecData.GetCar();
     ViewBag.ColorList  = apiBasecData.GetColor(CurrentUserInfo.CompanyID);
     ViewBag.GradeList  = apiBasecData.GetCustomerGrade();
     ViewBag.CustInfo   = apiCust.GetCustomerObj(id);
     // ViewBag.BusinessList = apiCust.GetBusinessList(id);
     ViewBag.NextPlanDate = apiCust.GetCustNextPlanDate(id);
     return(View());
 }
Example #10
0
 public ActionResult Business(int id, string BusinessType = "")
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     DataAPI.CustomerController  apiCust      = new DataAPI.CustomerController();
     ViewBag.SourceList   = apiBasecData.GetCustomerSource("");
     ViewBag.CarList      = apiBasecData.GetCar();
     ViewBag.ColorList    = apiBasecData.GetColor(CurrentUserInfo.CompanyID);
     ViewBag.GradeList    = apiBasecData.GetCustomerGrade();
     ViewBag.CustInfo     = apiCust.GetCustomerObj(id);
     ViewBag.BusinessList = apiCust.GetBusinessList(id);
     ViewBag.OrderList    = apiCust.GetOrderList(id);
     ViewBag.BusinessType = BusinessType;
     return(View());
 }
Example #11
0
        public ActionResult UserBinding(FormCollection collection)
        {
            WechatUserInfo CurrentWechatUserInfo = Session["WechatUserInfo"] as WechatUserInfo;
            string         LastUser = "";

            if (CurrentWechatUserInfo != null)
            {
                LastUser = CurrentWechatUserInfo.openid;
            }
            else
            {
                return(Content("长时间未操作,系统已自动退出,请从微信公众号菜单重新进入!"));
            }
            try
            {
                // Save BindingInfo

                User user = new User();
                user.UserID    = CurrentWechatUserInfo.UserID;
                user.EmpNo     = collection.GetValue("EmpNo").AttemptedValue.Trim();
                user.CompanyID = collection.GetValue("CompanyID").AttemptedValue.Trim();
                user.StoreID   = collection.GetValue("StoreID").AttemptedValue.Trim();
                user.Active    = "1";

                //is exists
                if (string.IsNullOrEmpty(user.EmpNo) || user.EmpNo == "")
                {
                    return(Content("请填写工号!"));
                }
                if (string.IsNullOrEmpty(user.CompanyID) || user.CompanyID == "")
                {
                    return(Content("请选择公司!"));
                }
                if (string.IsNullOrEmpty(user.StoreID) || user.StoreID == "")
                {
                    return(Content("请选择所在!"));
                }
                DataAPI.BasicDataController dtc = new DataAPI.BasicDataController();
                string checkBinding             = "";
                checkBinding = dtc.CheckBindingUser(user);
                if (checkBinding == "1")
                {
                    return(Content("该工号已被绑定,请检查!"));
                }
                if (checkBinding == "2")
                {
                    return(Content("查不到该工号的信息,无法绑定,请联系系统管理员!"));
                }

                if (dtc.AddBindingUser(user, LastUser) == "1")
                {
                    return(Content("1"));
                }
                else
                {
                    return(Content("绑定失败!"));
                }
            }
            catch
            {
                return(Content("-1"));
            }
        }
Example #12
0
 public ActionResult UserBinding()
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     ViewBag.CompanyList = apiBasecData.GetCompany();
     return(View());
 }
Example #13
0
        public ActionResult UserBinding(FormCollection bindingInfo)
        {
            string LastUser = "";

            if (CurrentWechatUserInfo != null)
            {
                LastUser = CurrentWechatUserInfo.openid;
            }
            else
            {
                return(Content("长时间未操作,系统已自动退出,请从微信公众号菜单重新进入!"));
            }
            try
            {
                // Save Cusotmer

                User bindUser = new User();


                bindUser.CompanyID = bindingInfo.GetValue("CompanyID").AttemptedValue.Trim();
                bindUser.StoreID   = bindingInfo.GetValue("StoreID").AttemptedValue.Trim();
                bindUser.EmpNo     = bindingInfo.GetValue("EmpNo").AttemptedValue.Trim();
                bindUser.UserID    = CurrentWechatUserInfo.UserID;


                if (string.IsNullOrEmpty(bindUser.CompanyID) || bindUser.CompanyID == "")
                {
                    return(Content("请选择你要绑定的公司!"));
                }
                if (string.IsNullOrEmpty(bindUser.StoreID) || bindUser.StoreID == "")
                {
                    return(Content("请选择绑定的分部!"));
                }

                if (string.IsNullOrEmpty(bindUser.EmpNo) || bindUser.EmpNo == "")
                {
                    return(Content("请输入你的工号!"));
                }

                DataAPI.BasicDataController dtc = new DataAPI.BasicDataController();

                //获取导入绑定基础信息,由用户维护。



                if (dtc.CheckBindingUser(bindUser.CompanyID, bindUser.EmpNo) == false)
                {
                    return(Content("改工号已被绑定,请检查!"));
                }

                if (dtc.BindUser(bindUser, LastUser) == "1")
                {
                    return(Content("1"));
                }
                else
                {
                    return(Content("保存失败!"));
                }
            }
            catch
            {
                return(Content("-1"));
            }
        }
Example #14
0
        public ActionResult AddColor(FormCollection collection)
        {
            string LastUser = "";

            if (CurrentWechatUserInfo != null)
            {
                LastUser = CurrentWechatUserInfo.openid;
            }
            else
            {
                return(Content("长时间未操作,系统已自动退出,请从微信公众号菜单重新进入!"));
            }
            try
            {
                // Save Cusotmer

                Color color = new Color();
                color.ColorID     = "0";
                color.ColorName   = collection.GetValue("ColorName").AttemptedValue.Trim();
                color.ColorType   = collection.GetValue("ColorType").AttemptedValue.Trim();
                color.ColorCode   = collection.GetValue("ColorCode").AttemptedValue.Trim();
                color.ColorTypeID = collection.GetValue("ColorTypeID").AttemptedValue.Trim();
                color.ColorActive = "0";
                foreach (var item in collection)
                {
                    if (item.ToString() == "ColorActive")
                    {
                        color.ColorActive = collection.GetValue("ColorActive").AttemptedValue.Trim();
                        break;
                    }
                }

                if (string.IsNullOrEmpty(color.ColorName) || color.ColorName == "")
                {
                    return(Content("请填写颜色名称!"));
                }
                if (string.IsNullOrEmpty(color.ColorType) || color.ColorType == "")
                {
                    return(Content("请选择颜色类型!"));
                }
                DataAPI.BasicDataController dtc = new DataAPI.BasicDataController();
                if (dtc.CheckDuplicateColor(color, CurrentUserInfo.CompanyID) == false)
                {
                    return(Content("你录入的颜色已存在系统中!"));
                }
                if (color.ColorActive.ToLower() == "on")
                {
                    color.ColorActive = "1";
                }
                if (dtc.AddColor(color, LastUser) == "1")
                {
                    return(Content("1"));
                }
                else
                {
                    return(Content("保存失败!"));
                }
            }
            catch
            {
                return(Content("-1"));
            }
        }
Example #15
0
 public ActionResult AddColor()
 {
     DataAPI.BasicDataController apiBasecData = new DataAPI.BasicDataController();
     ViewBag.ColorTypeList = apiBasecData.GetColorType(CurrentUserInfo.CompanyID);
     return(View());
 }