protected void Apply_MQ() { if (!IsCompanyCheck) { Utils.ResponseMeg(false, "对不起,你尚未审核通过!"); return; } string companyId = SiteUserInfo.CompanyID; string applyContact = Utils.GetFormValue("contact"); string tel = Utils.GetFormValue("tel"); string mobile = Utils.GetFormValue("mobile"); string address = Utils.GetFormValue("address"); EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo(); serviceInfo.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.MQ; serviceInfo.ApplyTime = DateTime.Now; serviceInfo.CityId = SiteUserInfo.CityId; EyouSoft.Model.SystemStructure.SysCity cityModel = EyouSoft.BLL.SystemStructure.SysCity.CreateInstance().GetSysCityModel(SiteUserInfo.CityId); if (cityModel != null) { serviceInfo.CityName = cityModel.CityName; } serviceInfo.CompanyId = SiteUserInfo.CompanyID; serviceInfo.CompanyName = SiteUserInfo.CompanyName; serviceInfo.ContactAddress = address; serviceInfo.ContactMobile = mobile; serviceInfo.ContactMQ = SiteUserInfo.ContactInfo.MQ; serviceInfo.ContactName = applyContact; serviceInfo.ContactQQ = SiteUserInfo.ContactInfo.QQ; serviceInfo.ContactTel = tel; serviceInfo.UserId = SiteUserInfo.ID; EyouSoft.Model.SystemStructure.SysProvince provinceModel = EyouSoft.BLL.SystemStructure.SysProvince.CreateInstance().GetProvinceModel(SiteUserInfo.ProvinceId); if (provinceModel != null) { serviceInfo.ProvinceName = provinceModel.ProvinceName; } serviceInfo.ProvinceId = SiteUserInfo.ProvinceId; if (!applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ)) { if (applyBll.Apply(serviceInfo)) { Utils.ResponseMegSuccess(); } else { Utils.ResponseMeg(false, "申请失败!"); } } else { Utils.ResponseMeg(false, "你已经提交过申请!"); } }
protected void Page_Load(object sender, EventArgs e) { if (!CheckGrant(TravelPermission.系统设置_权限管理)) { Utils.ResponseNoPermit(); return; } applyBll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance(); string isCustomer = Utils.GetQueryStringValue("iscustomer"); if (isCustomer == "yes") { sznb1.Visible = false; } companyName = SiteUserInfo.CompanyName; string method = Utils.GetFormValue("method"); if (method == "applyMQ") { Apply_MQ(); return; } if (applyBll.IsApply(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ)) { EyouSoft.Model.SystemStructure.SysApplyServiceInfo serviceInfo = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance().GetApplyInfo(SiteUserInfo.CompanyID, EyouSoft.Model.CompanyStructure.SysService.MQ); if (serviceInfo != null) { am_txtAddress.Visible = false; am_txtContact.Visible = false; am_txtMoible.Visible = false; am_txtTel.Visible = false; contantName = "<span>" + serviceInfo.ContactName + "</span>"; moible = "<span>" + serviceInfo.ContactMobile + "</span>"; tel = "<span>" + serviceInfo.ContactTel + "</span>"; adress = "<span>" + serviceInfo.ContactAddress + "</span>"; mq_message = "你已经申请开通MQ会员,目前处于审核当中……"; } isApply = "style='display:none'"; } else { am_txtContact.Value = SiteUserInfo.ContactInfo.ContactName; am_txtMoible.Value = SiteUserInfo.ContactInfo.Mobile; am_txtTel.Value = SiteUserInfo.ContactInfo.Tel; EyouSoft.Model.CompanyStructure.CompanyInfo companyModel = EyouSoft.BLL.CompanyStructure.CompanyInfo.CreateInstance().GetModel(SiteUserInfo.CompanyID); if (companyModel != null) { am_txtAddress.Value = companyModel.CompanyAddress; } } }
/// <summary> /// /// </summary> private void ApplyServiceTest() { int recordCount = 0; EyouSoft.Model.SystemStructure.SysApplyServiceInfo info = new EyouSoft.Model.SystemStructure.SysApplyServiceInfo(); info.ApplyServiceType = EyouSoft.Model.CompanyStructure.SysService.HighShop; info.ApplyText = "www.g.com"; info.ApplyTime = DateTime.Now; info.CityId = 1; info.CityName = "aq"; info.CompanyId = "bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4"; info.CompanyName = "company name"; info.ContactAddress = "company address"; info.ContactMobile = "15888888888"; info.ContactMQ = "10000"; info.ContactName = "contact name"; info.ContactQQ = "10000"; info.ContactTel = "057188888888"; info.ProvinceId = 1; info.ProvinceName = "ah"; info.UserId = "916b9d06-72e7-410c-8cd9-a8859d04c85e"; EyouSoft.IBLL.SystemStructure.ISysApplyService bll = EyouSoft.BLL.SystemStructure.SysApplyService.CreateInstance(); bll.Apply(info); bll.GetApplyInfo("d63d71cb-f1c4-4317-b944-9bf8884aa41f"); Response.Write(bll.GetApplys(10, 1, ref recordCount, EyouSoft.Model.CompanyStructure.SysService.HighShop, null, null, null, null, null, null).Count); Response.Write(bll.GetApplyState("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop)); Response.Write(bll.IsApply("bdfa4c0c-9ebc-497c-93d0-dd7255e5cab4", EyouSoft.Model.CompanyStructure.SysService.HighShop)); EyouSoft.Model.SystemStructure.EshopCheckInfo checkinfo = new EyouSoft.Model.SystemStructure.EshopCheckInfo(); checkinfo.ApplyId = "d63d71cb-f1c4-4317-b944-9bf8884aa41f"; checkinfo.ApplyState = EyouSoft.Model.SystemStructure.ApplyServiceState.审核通过; checkinfo.CheckTime = DateTime.Now; checkinfo.DomainName = "www.google.com"; checkinfo.EnableTime = Convert.ToDateTime("2010-01-01"); checkinfo.ExpireTime = Convert.ToDateTime("2010-01-31"); checkinfo.OperatorId = 1; Response.Write(bll.EshopChecked(checkinfo)); /*Response.Write(bll.Renewed("d63d71cb-f1c4-4317-b944-9bf8884aa41f", Convert.ToDateTime("2010-02-01") * , Convert.ToDateTime("2010-08-28"), 1, DateTime.Now));*/ }