/// <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))); }
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)); }
/// <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))); }
/// <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))); }
/// <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)); }
/// <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)); }
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)); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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); }
/// <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)); }
/// <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)); }
/// <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))); }
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); }
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); }