public ActionResult SaveForm(string keyValue, s_data_agentEntity entity) { entity.F_ApplicationId = LoginUserInfo.Get().userId; entity.F_Password = Md5Helper.Hash(entity.F_Password); agentManageIBLL.SaveEntity(keyValue, entity); return(Success("保存成功!")); }
/// <summary> /// 客户端登录 /// </summary> /// <param name="Account">用户名</param> /// <param name="PassWord">密码</param> /// <returns></returns> public ActionResult Login(string Account, string PassWord) { try { s_data_agentEntity s_Data_AgentEntity = agentManageBLL.Login(Account, PassWord); if (s_Data_AgentEntity.IsEmpty()) { throw new Exception("用户名或密码错误!"); } if (s_Data_AgentEntity.F_AllowEndTime < DateTime.Now) { throw new Exception("该账户授权已过期!"); } s_application_settingEntity s_Application_SettingEntity = application_SettingIBLL.GetEntityByApplicationId(s_Data_AgentEntity.F_ApplicationId); if (s_Application_SettingEntity.IsEmpty()) { throw new Exception("该用户已废弃!"); } dynamic dy = new { Account_Info = s_Data_AgentEntity,//机器人账户信息 Agent_Setting = s_Application_SettingEntity }; return(Success("登录成功!", dy)); } catch (Exception ex) { return(Fail(ex.Message)); } }