예제 #1
0
        public ActionResult DetailsGetDataPager(int pageIndex, int pageSize, int id)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();

            return(Content(JsonConvert.SerializeObject(objShopInfoBll.GetWeixinMPShop(pageIndex, pageSize, id,
                                                                                      LoginUser.UserBasic.EnterpriseID))));
        }
예제 #2
0
        /// <summary>
        /// 代理商门店导入
        /// </summary>
        /// <returns></returns>
        public ActionResult Introduction()
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("渠道ID", "Id");
            dic.Add("渠道类型(必填)", "Type");
            dic.Add("渠道或者门店名称(必填)", "Name");
            dic.Add("所属代理商(必填)", "AgentID");
            dic.Add("所属省(必填)", "ProvinceID");
            dic.Add("所属市(必填)", "CityID");
            dic.Add("所属区/县(必填)", "CountryID");
            dic.Add("联系人(必填)", "Contact");
            dic.Add("注册手机号码(必填)", "Tel");
            System.Data.DataTable dt = null;

            System.Data.DataTable newDt = new ShopInfoBll().InsertShopInfoFromExcel(LoginUser.UserBasic.EnterpriseID, dt);

            long timer = DateTime.Now.Ticks;

            if (dt.Rows.Count > 0)
            {
                Session["loadFile"] = newDt;
                return(Content(new { status = false }.GetJson()));
            }
            return(Content(new { status = true }.GetJson()));
        }
예제 #3
0
        public ActionResult EditShopQRNum(int id)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();
            var         model          = objShopInfoBll.GetByID(id, LoginUser.UserBasic.EnterpriseID);

            return(View(model));
        }
예제 #4
0
        public JsonResult UpdateAfter(ShopInfo model)
        {
            ShopInfoBll shopBll = new ShopInfoBll();

            model.EnterpriseID = AgentLoginUser.UserBasic.EnterpriseID;
            return(Json(shopBll.Update(model)));
        }
예제 #5
0
        public string SavePath(HttpPostedFileBase file)
        {
            Dictionary <string, string> dic = new Dictionary <string, string>();

            dic.Add("渠道ID", "Id");
            dic.Add("渠道类型(必填)", "Type");
            dic.Add("渠道或者门店名称(必填)", "Name");
            dic.Add("所属代理商(必填)", "AgentID");
            dic.Add("所属省(必填)", "ProvinceID");
            dic.Add("所属市(必填)", "CityID");
            dic.Add("所属区/县(必填)", "CountryID");
            dic.Add("联系人(必填)", "Contact");
            dic.Add("注册手机号码(必填)", "Tel");
            DataTable dt    = file.GetDataTable(dic);
            DataTable newDt = new ShopInfoBll().InsertShopInfoFromExcel(LoginUser.UserBasic.EnterpriseID, dt);

            long timer = DateTime.Now.Ticks;

            if (newDt.Rows.Count > 0)
            {
                Session["loadFile"] = newDt;
                return(new { status = false }.GetJson());
            }
            return(new { status = true }.GetJson());
        }
예제 #6
0
        /// <summary>
        /// 批量移动到渠道分组
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="ChannelId">渠道分组ID</param>
        /// <param name="shopIdList">实体店ID集合</param>
        /// <returns></returns>
        public JsonResult MobileShop(int ChannelId, string shopIdList)
        {
            ShopInfoBll shopBll = new ShopInfoBll();

            string[] shopIdLists = shopIdList.Split(',');
            return(Json(shopBll.Pause(ChannelId, shopIdLists)));
        }
예제 #7
0
 public ActionResult WeixinMPProvinceDetail(int WeixinMPID = 0, int ProvoiceID = 0)
 {
     //Bll要在这里实例化 不要在action外面 避免生成很多废代码
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     var data = objShopInfoBll.GetShopCityCountOfProvince(WeixinMPID, ProvoiceID, LoginUser.UserBasic.EnterpriseID);
     return View(data);
 }
예제 #8
0
        public ActionResult WeixinMPProvinceDetail(int WeixinMPID = 0, int ProvoiceID = 0)
        {
            //Bll要在这里实例化 不要在action外面 避免生成很多废代码
            ShopInfoBll objShopInfoBll = new ShopInfoBll();
            var         data           = objShopInfoBll.GetShopCityCountOfProvince(WeixinMPID, ProvoiceID, LoginUser.UserBasic.EnterpriseID);

            return(View(data));
        }
예제 #9
0
        /// <summary>
        /// 关闭代理商门店
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="shopId">直营店ID</param>
        /// <returns></returns>
        public JsonResult Delete(int shopId)
        {
            ShopInfoBll shopBll = new ShopInfoBll();
            int         status1 = 3;
            int         status2 = 6;

            return(Json(shopBll.Pause(status1, status2, shopId)));
        }
예제 #10
0
        /// <summary>
        /// 批量关闭直营店
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="shopIdList">直营店ID集合</param>
        /// <returns></returns>
        public JsonResult PauseDelete(string shopIdList)
        {
            ShopInfoBll shopBll = new ShopInfoBll();

            string[] shopIdLists = shopIdList.Split(',');
            int      statusGuid  = 3;
            int      status      = 6;

            return(Json(shopBll.PauseDele(statusGuid, status, shopIdLists)));
        }
예제 #11
0
        public ActionResult EditShopQRNumBatch(int id, string shopID)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();
            var         model          = objShopInfoBll.GetNotWeixinMPListByIDStr(shopID, LoginUser.UserBasic.EnterpriseID);
            WeixinMPBll objWeixinMPBll = new WeixinMPBll();

            //总可分配数
            ViewBag.Total = objWeixinMPBll.GetQRNumCan(id, LoginUser.UserBasic.EnterpriseID);
            //当前微信公众号ID
            ViewBag.WeixinMPID = id;
            return(View(model));
        }
예제 #12
0
        /// <summary>
        /// 代理商门店详情页
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model">model</param>
        /// <returns></returns>
        public ActionResult Details(int ShopId)
        {
            ShopInfoBll bll = new ShopInfoBll();

            if (Convert.ToInt32(bll.GetModeltCount(ShopId, "e0001")) == 0)
            {
                return(Content("<script>alert('不存在此门店');history.go(-1)</script>"));
            }
            else
            {
                return(View(bll.GetModel(ShopId, LoginUser.UserBasic.EnterpriseID)));
            }
        }
예제 #13
0
        /// <summary>
        /// 代理商门店详情页
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model">model</param>
        /// <returns></returns>
        public ActionResult Details(int ShopId)
        {
            ShopInfoBll bll      = new ShopInfoBll();
            int         GetCount = Convert.ToInt32(bll.GetModeltCount(ShopId, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID));

            if (GetCount == 0)
            {
                return(Content("<script>alert('不存在此门店信息!');history.go(-1)</script>"));
            }
            else
            {
                ShopInfoView model = new ShopInfoView();
                model = bll.GetModel(ShopId, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID);
                return(View(model));
            }
        }
예제 #14
0
        /// <summary>
        /// 审核门店
        /// </summary>
        /// <param name="Remarks">审核备注</param>
        /// <param name="ShopId">门店ID</param>
        /// <returns></returns>
        public JsonResult ToExamine(string Remarks, int ShopId, int pd)
        {
            ShopInfoBll shopBll = new ShopInfoBll();

            int status;

            if (pd == 1)
            {
                status = 2;
            }
            else
            {
                status = 4;
            }
            return(Json(shopBll.ToExamine(status, Remarks, ShopId)));
        }
예제 #15
0
        /// <summary>
        /// 暂停,恢复
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="shopIdList"></param>
        /// <param name="Pd"></param>
        /// <returns></returns>
        public JsonResult Edit(int shopId, int Pd)
        {
            ShopInfoBll shopBll = new ShopInfoBll();
            int status1, status2;
            if (Pd == 1)
            {
                status1 = 2;
                status2 = 5;
            }
            else
            {
                status1 = 0;
                status2 = 0;
            }

            return Json(shopBll.Pause(status1, status2, shopId));
        }
예제 #16
0
        /// <summary>
        /// 暂停,恢复
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="shopIdList"></param>
        /// <param name="Pd"></param>
        /// <returns></returns>
        public JsonResult Edit(int shopId, int Pd)
        {
            ShopInfoBll shopBll = new ShopInfoBll();
            int         status1, status2;

            if (Pd == 1)
            {
                status1 = 2;
                status2 = 5;
            }
            else
            {
                status1 = 0;
                status2 = 0;
            }

            return(Json(shopBll.Pause(status1, status2, shopId)));
        }
예제 #17
0
        public JsonResult Agent_CreateAfter(ShopInfo model)
        {
            ShopInfoBll bll = new ShopInfoBll();

            model.Relation     = 2;
            model.ContactPhone = "";
            model.Address      = "";
            model.Range        = "";
            model.shopIMG      = "";
            model.WeixinMPID   = 0;
            model.Remarks      = "";
            model.ContactTEL   = "";
            model.Status       = 1;
            model.ProvinceID   = model.ProvinceID;
            model.CityID       = model.CityID;
            model.CountyID     = model.CountyID;
            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;

            return(Json(bll.Create(model)));
        }
예제 #18
0
        public string SavePath(HttpPostedFileBase file)
        {
            Dictionary<string, string> dic = new Dictionary<string, string>();
            dic.Add("渠道ID", "Id");
            dic.Add("渠道类型(必填)", "Type");
            dic.Add("渠道或者门店名称(必填)", "Name");
            dic.Add("所属代理商(必填)", "AgentID");
            dic.Add("所属省(必填)", "ProvinceID");
            dic.Add("所属市(必填)", "CityID");
            dic.Add("所属区/县(必填)", "CountryID");
            dic.Add("联系人(必填)", "Contact");
            dic.Add("注册手机号码(必填)", "Tel");
            DataTable dt = file.GetDataTable(dic);
            DataTable newDt = new ShopInfoBll().InsertShopInfoFromExcel(LoginUser.UserBasic.EnterpriseID, dt);

            long timer = DateTime.Now.Ticks;
            if (newDt.Rows.Count > 0)
            {
                Session["loadFile"] = newDt;
                return new { status = false }.GetJson();
            }
            return new { status = true }.GetJson();
        }
예제 #19
0
        public JsonResult CreateAfter(ShopInfo model)
        {
            Utility.ReturnData <string> returnData = new Utility.ReturnData <string>();
            ShopInfoBll shopBll = new ShopInfoBll();
            UserPC      _model  = CacheHelp.Get("user") as UserPC;

            model.Relation     = 1;
            model.ContactPhone = "";
            model.Address      = "";
            model.Range        = "";
            model.shopIMG      = "";
            model.WeixinMPID   = 0;
            model.Remarks      = "";
            model.AgentID      = 0;
            model.ContactTEL   = "";
            model.Status       = 2;
            model.ProvinceID   = model.ProvinceID;
            model.CityID       = model.CityID;
            model.CountyID     = model.CountyID;
            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;
            returnData         = shopBll.Create(model);
            return(Json(returnData));
        }
예제 #20
0
        public ActionResult GetNotWeixinMP(int pageIndex, int pageSize)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();

            return(Content(JsonConvert.SerializeObject(objShopInfoBll.GetNotWeixinMPEnterpriseShop(pageIndex, pageSize, LoginUser.UserBasic.EnterpriseID))));
        }
예제 #21
0
        /// <summary>
        /// 代理商门店详情页
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model">model</param>
        /// <returns></returns>
        public ActionResult Details(int ShopId)
        {
            ShopInfoBll bll = new ShopInfoBll();
            int GetCount = Convert.ToInt32(bll.GetModeltCount(ShopId, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID));

            if (GetCount == 0)
            {
                return Content("<script>alert('不存在此门店信息!');history.go(-1)</script>");
            }
            else
            {
                ShopInfoView model = new ShopInfoView();
                model = bll.GetModel(ShopId, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID);
                return View(model);
            }
        }
예제 #22
0
 public JsonResult CreateAfter(ShopInfo model)
 {
     Utility.ReturnData<string> returnData = new Utility.ReturnData<string>();
     ShopInfoBll shopBll = new ShopInfoBll();
     //UserPC _model = CacheHelp.Get("user") as UserPC;
     model.Relation = 2;
     model.ContactPhone = "";
     model.Address = "";
     model.Range = "";
     model.shopIMG = "";
     model.WeixinMPID = 0;
     model.Remarks = "";
     model.AgentID = AgentLoginUser.RoleID;
     model.ContactTEL = "";
     model.Status = 1;
     model.ChannelGroupID = 0;
     model.ProvinceID = model.ProvinceID;
     model.CityID = model.CityID;
     model.CountyID = model.CountyID;
     model.EnterpriseID = AgentLoginUser.UserBasic.EnterpriseID;
     returnData = shopBll.Create(model);
     return Json(returnData);
 }
예제 #23
0
 /// <summary>
 /// 批量关闭直营店
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="shopIdList">直营店ID集合</param>
 /// <returns></returns>
 public JsonResult PauseDelete(string shopIdList)
 {
     ShopInfoBll shopBll = new ShopInfoBll();
     string[] shopIdLists = shopIdList.Split(',');
     int statusGuid = 3;
     int status = 6;
     return Json(shopBll.PauseDele(statusGuid, status, shopIdLists));
 }
예제 #24
0
 /// <summary>
 /// 代理商门店详情页
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="model">model</param>
 /// <returns></returns>
 public ActionResult Details(int ShopId)
 {
     ShopInfoBll bll = new ShopInfoBll();
     if (Convert.ToInt32(bll.GetModeltCount(ShopId, "e0001")) == 0)
     {
         return Content("<script>alert('不存在此门店');history.go(-1)</script>");
     }
     else {
         return View(bll.GetModel(ShopId, LoginUser.UserBasic.EnterpriseID));
     }
 }
예제 #25
0
 public ActionResult GetNotWeixinMP(int pageIndex, int pageSize)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     return Content(JsonConvert.SerializeObject(objShopInfoBll.GetNotWeixinMPEnterpriseShop(pageIndex, pageSize, LoginUser.UserBasic.EnterpriseID)));
 }
예제 #26
0
 public ActionResult EditAgentShopAfter(ShopInfo model)
 {
     ShopInfoBll shopBll = new ShopInfoBll();
     model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;
     return Json(shopBll.Update(model));
 }
예제 #27
0
        public ActionResult DetailsGetTotal(int id)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();

            return(Content(objShopInfoBll.GetWeixinMPShopTotal(id, LoginUser.UserBasic.EnterpriseID).ToString()));
        }
예제 #28
0
        /// <summary>
        /// 用于输入框实体店名称关键字搜索
        /// 竺杨平添加
        /// </summary>
        /// <param name="q">关键字</param>
        /// <param name="limit">取前第几行</param>
        /// <param name="status">实体店状态</param>
        /// <returns></returns>
        public ActionResult GetShopName(string q, int limit = 20, int status = 0)
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();

            return(Content(JsonConvert.SerializeObject(objShopInfoBll.GetShopName(q, limit, status))));
        }
예제 #29
0
 /// <summary>
 /// 用于输入框实体店名称关键字搜索
 /// 竺杨平添加
 /// </summary>
 /// <param name="q">关键字</param>
 /// <param name="limit">取前第几行</param>
 /// <param name="status">实体店状态</param>
 /// <returns></returns>
 public ActionResult GetShopName(string q, int limit = 20, int status = 0)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     return Content(JsonConvert.SerializeObject(objShopInfoBll.GetShopName(q, limit, status)));
 }
예제 #30
0
 /// <summary>
 /// 批量移动到渠道分组
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="ChannelId">渠道分组ID</param>
 /// <param name="shopIdList">实体店ID集合</param>
 /// <returns></returns>
 public JsonResult MobileShop(int ChannelId, string shopIdList)
 {
     ShopInfoBll shopBll = new ShopInfoBll();
     string[] shopIdLists = shopIdList.Split(',');
     return Json(shopBll.Pause(ChannelId, shopIdLists));
 }
예제 #31
0
        /// <summary>
        /// 代理商门店导入
        /// </summary>
        /// <returns></returns>
        public ActionResult Introduction()
        {
            Dictionary<string, string> dic = new Dictionary<string, string>();

            dic.Add("渠道ID", "Id");
            dic.Add("渠道类型(必填)", "Type");
            dic.Add("渠道或者门店名称(必填)", "Name");
            dic.Add("所属代理商(必填)", "AgentID");
            dic.Add("所属省(必填)", "ProvinceID");
            dic.Add("所属市(必填)", "CityID");
            dic.Add("所属区/县(必填)", "CountryID");
            dic.Add("联系人(必填)", "Contact");
            dic.Add("注册手机号码(必填)", "Tel");
            System.Data.DataTable dt = null;

            System.Data.DataTable newDt = new ShopInfoBll().InsertShopInfoFromExcel(LoginUser.UserBasic.EnterpriseID, dt);

            long timer = DateTime.Now.Ticks;
            if (dt.Rows.Count > 0)
            {
                Session["loadFile"] = newDt;
                return Content(new { status = false }.GetJson());
            }
            return Content(new { status = true }.GetJson());
        }
예제 #32
0
 /// <summary>
 /// 门店编辑页面
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="model">直营店实例</param>
 /// <returns></returns>
 public ActionResult Update(int ID)
 {
     ShopInfoBll bll = new ShopInfoBll();
     return View(bll.GetModel(ID, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID));
 }
예제 #33
0
 public ActionResult DetailsGetDataPager(int pageIndex, int pageSize, int id)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     return Content(JsonConvert.SerializeObject(objShopInfoBll.GetWeixinMPShop(pageIndex, pageSize, id,
         LoginUser.UserBasic.EnterpriseID)));
 }
예제 #34
0
 public JsonResult UpdateAfter(ShopInfo model)
 {
     ShopInfoBll shopBll = new ShopInfoBll();
     model.EnterpriseID = AgentLoginUser.UserBasic.EnterpriseID;
     return Json(shopBll.Update(model));
 }
예제 #35
0
 public ActionResult EditShopQRNumBatch(int id, string shopID)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     var model = objShopInfoBll.GetNotWeixinMPListByIDStr(shopID, LoginUser.UserBasic.EnterpriseID);
     WeixinMPBll objWeixinMPBll = new WeixinMPBll();
     //总可分配数
     ViewBag.Total = objWeixinMPBll.GetQRNumCan(id, LoginUser.UserBasic.EnterpriseID);
     //当前微信公众号ID
     ViewBag.WeixinMPID = id;
     return View(model);
 }
예제 #36
0
 public ActionResult GetNotWeixinMPTotal()
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     return Content(objShopInfoBll.GetNotWeixinMPEnterpriseShopTotal(LoginUser.UserBasic.EnterpriseID).ToString());
 }
예제 #37
0
        public ActionResult GetNotWeixinMPTotal()
        {
            ShopInfoBll objShopInfoBll = new ShopInfoBll();

            return(Content(objShopInfoBll.GetNotWeixinMPEnterpriseShopTotal(LoginUser.UserBasic.EnterpriseID).ToString()));
        }
예제 #38
0
 public ActionResult DetailsGetTotal(int id)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     return Content(objShopInfoBll.GetWeixinMPShopTotal(id, LoginUser.UserBasic.EnterpriseID).ToString());
 }
예제 #39
0
        public JsonResult Agent_CreateAfter(ShopInfo model)
        {
            ShopInfoBll bll = new ShopInfoBll();

            model.Relation = 2;
            model.ContactPhone = "";
            model.Address = "";
            model.Range = "";
            model.shopIMG = "";
            model.WeixinMPID = 0;
            model.Remarks = "";
            model.ContactTEL = "";
            model.Status = 1;
            model.ProvinceID = model.ProvinceID;
            model.CityID = model.CityID;
            model.CountyID = model.CountyID;
            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;

            return Json(bll.Create(model));
        }
예제 #40
0
 public ActionResult EditShopQRNum(int id)
 {
     ShopInfoBll objShopInfoBll = new ShopInfoBll();
     var model = objShopInfoBll.GetByID(id, LoginUser.UserBasic.EnterpriseID);
     return View(model);
 }
예제 #41
0
        /// <summary>
        /// 门店编辑页面
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model">直营店实例</param>
        /// <returns></returns>
        public ActionResult Update(int ID)
        {
            ShopInfoBll bll = new ShopInfoBll();

            return(View(bll.GetModel(ID, AgentLoginUser.UserBasic.EnterpriseID, AgentLoginUser.RoleID)));
        }
예제 #42
0
        /// <summary>
        /// 审核门店
        /// </summary>
        /// <param name="Remarks">审核备注</param>
        /// <param name="ShopId">门店ID</param>
        /// <returns></returns>
         public JsonResult ToExamine(string Remarks, int ShopId,int pd)
         {
             ShopInfoBll shopBll = new ShopInfoBll();

             int status;
             if (pd == 1)
             {
                 status = 2;
             }
             else
             {
                 status = 4;
             }
             return Json(shopBll.ToExamine(status, Remarks, ShopId));
         }
예제 #43
0
 /// <summary>
 /// 关闭代理商门店
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="shopId">直营店ID</param>
 /// <returns></returns>
 public JsonResult Delete(int shopId)
 {
     ShopInfoBll shopBll = new ShopInfoBll();
     int status1 = 3;
     int status2 = 6;
     return Json(shopBll.Pause(status1, status2, shopId));
 }