Exemplo n.º 1
0
        /// <summary>
        /// 移动到渠道分组
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="ChannelGroupID"></param>
        /// <param name="AgenId"></param>
        /// <returns></returns>
        public JsonResult MobileChannel(int ChannelGroupID, string AgenId)
        {
            AgentBll agenBll = new AgentBll();

            string[] AgenIdLists = AgenId.Split(',');
            return(Json(agenBll.MobileChannel(ChannelGroupID, AgenIdLists, LoginUser.UserBasic.EnterpriseID)));
        }
Exemplo n.º 2
0
        public ActionResult FirstLogin(string name, string pwd, string num)
        {
            ReturnData <string> ret   = new ReturnData <string>();
            AgentBll            aBll  = new AgentBll();
            UserBasicBll        uBll  = new UserBasicBll();
            UserPCBll           pcBll = new UserPCBll();

            Agent     aModel  = aBll.GetModelByPhone(num);
            UserBasic uModel  = new UserBasic();
            UserPC    pcModel = new UserPC();

            uModel.NickName     = name;
            uModel.UserType     = 1;
            uModel.EnterpriseID = aModel.EnterpriseID;
            uModel.AddTime      = DateTime.Now;
            long id = uBll.AddAndGetId(uModel);

            pcModel.UserBasicID    = id;
            pcModel.PassWord       = SimpleEncrypt.SaltMD5(pwd.Replace(" ", ""));
            pcModel.PCType         = 2;
            pcModel.RoleID         = aModel.ID;
            pcModel.Status         = 0;
            pcModel.UserName       = name;
            pcModel.AddTime        = DateTime.Now;
            pcModel.AddUserBasicID = 0;
            ret = pcBll.AddUserPc(pcModel);
            if (ret.Status == true)
            {
                aModel.Status = 0;
                aBll.EditAgent(aModel);
                return(Content(ret.Message));
            }
            return(Content(ret.Message));
        }
Exemplo n.º 3
0
        /// <summary>
        /// 批量关闭代理商
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="AgenId"></param>
        /// <returns></returns>
        public JsonResult DeleteList(string AgenId)
        {
            AgentBll agenBll     = new AgentBll();
            int      statusShop  = 6;
            int      statusAgent = 3;

            string[] AgenIdLists = AgenId.Split(',');
            return(Json(agenBll.DeleteList(statusShop, statusAgent, AgenIdLists, LoginUser.UserBasic.EnterpriseID)));
        }
Exemplo n.º 4
0
        /// <summary>
        /// 修改代理商
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult EditAfter(Agent model)
        {
            AgentBll agenBll = new AgentBll();

            if (model.Remarks == null)
            {
                model.Remarks = "";
            }
            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;

            return(Json(agenBll.Edit(model)));
        }
Exemplo n.º 5
0
        /// <summary>
        /// 删除方法
        /// 负责人:xhr
        /// </summary>
        /// <param name="pd"></param>
        /// <param name="shopId"></param>
        /// <returns></returns>
        public JsonResult Delete(int pd, int shopId)
        {
            int      statusShop = 0, statusAgent = 0;
            AgentBll agentBll = new AgentBll();

            if (pd == 1)
            {
                statusShop  = 6;
                statusAgent = 3;
            }
            return(Json(agentBll.Pause(statusShop, statusAgent, shopId, LoginUser.UserBasic.EnterpriseID), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 6
0
        /// <summary>
        /// 新增代理商
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult CreateAfter(Agent model)
        {
            AgentBll agenBll = new AgentBll();

            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;
            model.ContactTEL   = "";
            model.ContactPhone = "";
            model.Address      = "";
            model.Range        = "";
            if (model.Remarks == null)
            {
                model.Remarks = "";
            }
            return(Json(agenBll.Create(model), JsonRequestBehavior.AllowGet));
        }
Exemplo n.º 7
0
        public ActionResult CheckNum(string num)
        {
            AgentBll      bll  = new AgentBll();
            EnterpriseBll eBll = new EnterpriseBll();


            Agent      model  = bll.GetModelByPhone(num);
            Enterprise emodel = eBll.GetModelById(model.EnterpriseID);

            if (model == null)
            {
                return(Content("您所输入的手机号码不存在!请确认号码!"));
            }
            if (model.Status != 1)
            {
                return(Content("您所输入的手机号码不是待验证状态!请确认号码!"));
            }
            ISMS   test     = new Sms();
            string checkNum = test.SendbyGSM(num, emodel.EName);

            return(Content(checkNum));
        }
Exemplo n.º 8
0
        /// <summary>
        /// 暂停,恢复方法
        /// 负责人:xhr
        /// </summary>
        /// <param name="pd"></param>
        /// <param name="shopId"></param>
        /// <returns></returns>
        public JsonResult Pause(int pd,int shopId) {
            int statusShop, statusAgent;
            AgentBll agentBll = new AgentBll();
            if (pd == 1) {
                statusShop = 6;
                statusAgent = 3;
            }
            else if (pd == 2)
            {
                statusShop = 5;
                statusAgent = 2;
            }
            else
            {
                statusShop = 0;
                statusAgent = 0;
            }
            return Json(agentBll.Pause(statusShop, statusAgent, shopId, LoginUser.UserBasic.EnterpriseID), JsonRequestBehavior.AllowGet);

        }
Exemplo n.º 9
0
        /// <summary>
        /// 代理商详情页
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(int AgentId) {
            AgentBll agent = new AgentBll();

            return View(agent.getAgentModel(AgentId, LoginUser.UserBasic.EnterpriseID));
        }
Exemplo n.º 10
0
        /// <summary>
        /// 修改代理商
        /// 负责人:谢海荣
        /// </summary>
        /// <param name="model"></param>
        /// <returns></returns>
        public JsonResult EditAfter(Agent model)
        {
            AgentBll agenBll = new AgentBll();
            if (model.Remarks == null)
            {
                model.Remarks = "";
            }
            model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;

            return Json(agenBll.Edit(model));
        }
Exemplo n.º 11
0
 /// <summary>
 /// 新增代理商
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="model"></param>
 /// <returns></returns>
 public JsonResult CreateAfter(Agent model)
 {
     AgentBll agenBll = new AgentBll();
     model.EnterpriseID = LoginUser.UserBasic.EnterpriseID;
     model.ContactTEL = "";
     model.ContactPhone = "";
     model.Address = "";
     model.Range = "";
     if (model.Remarks == null) {
         model.Remarks = "";
     }
     return Json(agenBll.Create(model), JsonRequestBehavior.AllowGet);
 }
Exemplo n.º 12
0
 /// <summary>
 /// 移动到渠道分组
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="ChannelGroupID"></param>
 /// <param name="AgenId"></param>
 /// <returns></returns>
 public JsonResult MobileChannel(int ChannelGroupID, string AgenId) {
     AgentBll agenBll = new AgentBll();
     string[] AgenIdLists = AgenId.Split(',');
     return Json(agenBll.MobileChannel(ChannelGroupID, AgenIdLists, LoginUser.UserBasic.EnterpriseID));
 }
Exemplo n.º 13
0
 /// <summary>
 /// 批量关闭代理商
 /// 负责人:谢海荣
 /// </summary>
 /// <param name="AgenId"></param>
 /// <returns></returns>
 public JsonResult DeleteList(string AgenId)
 {
     AgentBll agenBll = new AgentBll();
     int statusShop = 6;
     int statusAgent = 3;
     string[] AgenIdLists = AgenId.Split(',');
     return Json(agenBll.DeleteList(statusShop, statusAgent, AgenIdLists, LoginUser.UserBasic.EnterpriseID));
 }
Exemplo n.º 14
0
        /// <summary>
        /// 代理商详情页
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public ActionResult Details(int AgentId)
        {
            AgentBll agent = new AgentBll();

            return(View(agent.getAgentModel(AgentId, LoginUser.UserBasic.EnterpriseID)));
        }
Exemplo n.º 15
0
        public ActionResult CheckNum(string num)
        {
            AgentBll bll = new AgentBll();
            EnterpriseBll eBll = new EnterpriseBll();


            Agent model = bll.GetModelByPhone(num);
            Enterprise emodel = eBll.GetModelById(model.EnterpriseID);
            if (model == null)
            {
                return Content("您所输入的手机号码不存在!请确认号码!");
            }
            if (model.Status != 1)
            {
                return Content("您所输入的手机号码不是待验证状态!请确认号码!");
            }
            ISMS test = new Sms();
            string checkNum = test.SendbyGSM(num, emodel.EName);
            return Content(checkNum);
        }
Exemplo n.º 16
0
        public ActionResult FirstLogin(string name, string pwd, string num)
        {
            ReturnData<string> ret = new ReturnData<string>();
            AgentBll aBll = new AgentBll();
            UserBasicBll uBll = new UserBasicBll();
            UserPCBll pcBll = new UserPCBll();

            Agent aModel = aBll.GetModelByPhone(num);
            UserBasic uModel = new UserBasic();
            UserPC pcModel = new UserPC();

            uModel.NickName = name;
            uModel.UserType = 1;
            uModel.EnterpriseID = aModel.EnterpriseID;
            uModel.AddTime = DateTime.Now;
            long id = uBll.AddAndGetId(uModel);

            pcModel.UserBasicID = id;
            pcModel.PassWord = SimpleEncrypt.SaltMD5(pwd.Replace(" ", ""));
            pcModel.PCType = 2;
            pcModel.RoleID = aModel.ID;
            pcModel.Status = 0;
            pcModel.UserName = name;
            pcModel.AddTime = DateTime.Now;
            pcModel.AddUserBasicID = 0;
            ret = pcBll.AddUserPc(pcModel);
            if (ret.Status == true)
            {
                aModel.Status = 0;
                aBll.EditAgent(aModel);
                return Content(ret.Message);

            }
            return Content(ret.Message);
        }