protected override void OnPreInit(EventArgs e) { base.OnPreInit(e); imageServerUrl = ImageManage.GetImagerServerUrl(1); isLogin = EyouSoft.Security.Membership.UserProvider.IsUserLogin(); Model.CompanyStructure.CompanyUser user = EyouSoft.BLL.CompanyStructure.CompanyUser.CreateInstance().GetModel("50caa9ca-f15c-440e-8d91-8d160de3c382"); _userInfo = new UserInfo() { CityId = 1, CompanyID = "1e5edc20-4b83-4c16-8c52-008e0c09bd1e", UserName = user.UserName, ContactInfo = user.ContactInfo, DepartId = "1", ProvinceId = 1, DepartName = "432fds", IsAdmin = true, ID = "50caa9ca-f15c-440e-8d91-8d160de3c382", }; Model.CompanyStructure.CompanyRole r = new EyouSoft.Model.CompanyStructure.CompanyRole(); r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.专线); r.SetRole(EyouSoft.Model.CompanyStructure.CompanyType.组团); _userInfo.CompanyRole = r; _userInfo.AreaId = new int[3] { 1, 2, 3 }; //string[] arr = user.AreaList.Split(','); //for (int i = 0; i < arr.Length; i++) //{ // _userInfo.AreaId[i] = Int32.Parse(arr[i]); //} }
/// <summary> /// 发送短线 /// </summary> /// <param name="srcMq">发送人</param> /// <param name="dstMq">接收人</param> public void SendMessage(int srcMq, int dstMq) { Model.CompanyStructure.CompanyUser ToCompany = uIdal.GetModel(dstMq); Model.CompanyStructure.CompanyAndUserInfo fromCompany = GetUserCompanyModel(srcMq); if (ToCompany != null && fromCompany != null) { if (IsSendMsgTip(EyouSoft.Model.ToolStructure.MsgType.MQNoReadMsg, EyouSoft.Model.ToolStructure.MsgSendWay.SMS, dstMq.ToString(), ToCompany.CityId)) { SendMail(ToCompany.ContactInfo.Email, ToCompany.UserName, dstMq.ToString(), ToCompany.PassWordInfo.NoEncryptPassword); SendSms(ToCompany.ContactInfo.Mobile, fromCompany.Company.CompanyName, fromCompany.User.ContactInfo.ContactName, ToCompany.UserName); EyouSoft.Model.ToolStructure.MsgTipRecord tipModel = new EyouSoft.Model.ToolStructure.MsgTipRecord(); tipModel.Email = string.Empty; tipModel.FromMQID = srcMq.ToString(); tipModel.ToMQID = dstMq.ToString(); tipModel.Mobile = ToCompany.ContactInfo.Mobile; tipModel.MsgType = EyouSoft.Model.ToolStructure.MsgType.MQNoReadMsg; tipModel.SendWay = EyouSoft.Model.ToolStructure.MsgSendWay.SMS; idal.Add(tipModel); } } }