public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } _cardId = Body.GetQueryInt("cardID"); _cardSnid = Body.GetQueryInt("cardSNID"); if (!IsPostBack) { var cardInfoList = DataProviderWx.CardDao.GetCardInfoList(PublishmentSystemId); foreach (var cardInfo in cardInfoList) { if (_cardId <= 0) { _cardId = cardInfo.Id; } DdlCard.Items.Add(new ListItem(cardInfo.CardTitle, cardInfo.Id.ToString())); } DdlKeyWordType.Items.Add(new ListItem("卡号", "cardSN")); DdlKeyWordType.Items.Add(new ListItem("手机", "mobile")); EConsumeTypeUtils.AddListItems(DdlConsumeType); ControlUtils.SelectListItems(DdlConsumeType, EConsumeTypeUtils.GetValue(EConsumeType.CardAmount)); var operatorInfoList = new List <CardOperatorInfo>(); var theCardInfo = DataProviderWx.CardDao.GetCardInfo(_cardId); if (theCardInfo != null) { operatorInfoList = TranslateUtils.JsonToObject(theCardInfo.ShopOperatorList, operatorInfoList) as List <CardOperatorInfo>; if (operatorInfoList != null) { foreach (var operaotorInfo in operatorInfoList) { DdlOperator.Items.Add(new ListItem(operaotorInfo.UserName, operaotorInfo.UserName)); } } } if (Body.IsQueryExists("cardType")) { ControlUtils.SelectListItems(DdlCard, Body.GetQueryString("cardType")); } if (_cardSnid > 0) { PhKeyWord.Visible = false; } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } cardID = TranslateUtils.ToInt(GetQueryString("cardID")); cardSNID = TranslateUtils.ToInt(GetQueryString("cardSNID")); if (!IsPostBack) { var cardInfoList = DataProviderWX.CardDAO.GetCardInfoList(PublishmentSystemID); foreach (var cardInfo in cardInfoList) { if (cardID <= 0) { cardID = cardInfo.ID; } ddlCard.Items.Add(new ListItem(cardInfo.CardTitle, cardInfo.ID.ToString())); } ddlKeyWordType.Items.Add(new ListItem("卡号", "cardSN")); ddlKeyWordType.Items.Add(new ListItem("手机", "mobile")); EConsumeTypeUtils.AddListItems(ddlConsumeType); ControlUtils.SelectListItems(ddlConsumeType, EConsumeTypeUtils.GetValue(EConsumeType.CardAmount)); var operatorInfoList = new List <CardOperatorInfo>(); var theCardInfo = DataProviderWX.CardDAO.GetCardInfo(cardID); if (theCardInfo != null) { operatorInfoList = TranslateUtils.JsonToObject(theCardInfo.ShopOperatorList, operatorInfoList) as List <CardOperatorInfo>; if (operatorInfoList != null) { foreach (var operaotorInfo in operatorInfoList) { ddlOperator.Items.Add(new ListItem(operaotorInfo.UserName, operaotorInfo.UserName)); } } } if (!string.IsNullOrEmpty(GetQueryString("cardType"))) { ControlUtils.SelectListItems(ddlCard, GetQueryString("cardType")); } if (cardSNID > 0) { phKeyWord.Visible = false; } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } cardID = TranslateUtils.ToInt(GetQueryString("cardID")); if (!IsPostBack) { var cardInfo = DataProviderWX.CardDAO.GetCardInfo(cardID); var operatorInfoList = new List <CardOperatorInfo>(); operatorInfoList = TranslateUtils.JsonToObject(cardInfo.ShopOperatorList, operatorInfoList) as List <CardOperatorInfo>; if (operatorInfoList != null) { var operatorBuilder = new StringBuilder(); foreach (var operatorInfo in operatorInfoList) { operatorBuilder.AppendFormat(@"{{userName: '******', password: '******'}},", operatorInfo.UserName, operatorInfo.Password); } if (operatorBuilder.Length > 0) { operatorBuilder.Length--; } ltlOperatorItems.Text = $@"itemController.itemCount = {operatorInfoList.Count};itemController.items = [{operatorBuilder .ToString()}];"; } else { ltlOperatorItems.Text = "itemController.itemCount = 0;itemController.items = [{}];"; } } }
public void Page_Load(object sender, EventArgs e) { if (IsForbidden) { return; } PageUtils.CheckRequestParameter("PublishmentSystemId"); _conferenceId = Body.GetQueryInt("conferenceID"); if (!IsPostBack) { var pageTitle = _conferenceId > 0 ? "编辑会议(活动)" : "添加会议(活动)"; BreadCrumb(AppManager.WeiXin.LeftMenu.IdFunction, AppManager.WeiXin.LeftMenu.Function.IdConference, pageTitle, AppManager.WeiXin.Permission.WebSite.Conference); LtlPageTitle.Text = pageTitle; LtlImageUrl.Text = $@"<img id=""preview_imageUrl"" src=""{ConferenceManager.GetImageUrl(PublishmentSystemInfo, string.Empty)}"" width=""370"" align=""middle"" />"; LtlBackgroundImageUrl.Text = $@"{ComponentsManager.GetBackgroundImageSelectHtml(PublishmentSystemInfo, string.Empty)}<hr /><img id=""preview_backgroundImageUrl"" src=""{ComponentsManager .GetBackgroundImageUrl(PublishmentSystemInfo, string.Empty)}"" width=""370"" align=""middle"" />"; LtlEndImageUrl.Text = $@"<img id=""preview_endImageUrl"" src=""{ConferenceManager.GetEndImageUrl(PublishmentSystemInfo, string.Empty)}"" width=""370"" align=""middle"" />"; var selectImageClick = ModalSelectImage.GetOpenWindowString(PublishmentSystemInfo, "itemPicUrl_"); var uploadImageClick = ModalUploadImageSingle.GetOpenWindowStringToTextBox(PublishmentSystemId, "itemPicUrl_"); var cuttingImageClick = ModalCuttingImage.GetOpenWindowStringWithTextBox(PublishmentSystemId, "itemPicUrl_"); var previewImageClick = ModalMessage.GetOpenWindowStringToPreviewImage(PublishmentSystemId, "itemPicUrl_"); LtlGuestScript.Text = $@"guestController.selectImageClickString = ""{selectImageClick}"";guestController.uploadImageClickString = ""{uploadImageClick}"";guestController.cuttingImageClickString = ""{cuttingImageClick}"";guestController.previewImageClickString = ""{previewImageClick}"";"; if (_conferenceId == 0) { LtlAgendaScript.Text += "agendaController.agendaCount = 2;agendaController.items = [{}, {}];"; LtlGuestScript.Text += "guestController.guestCount = 2;guestController.items = [{}, {}];"; DtbEndDate.DateTime = DateTime.Now.AddMonths(1); } else { var conferenceInfo = DataProviderWx.ConferenceDao.GetConferenceInfo(_conferenceId); TbKeywords.Text = DataProviderWx.KeywordDao.GetKeywords(conferenceInfo.KeywordId); CbIsEnabled.Checked = !conferenceInfo.IsDisabled; DtbStartDate.DateTime = conferenceInfo.StartDate; DtbEndDate.DateTime = conferenceInfo.EndDate; TbTitle.Text = conferenceInfo.Title; if (!string.IsNullOrEmpty(conferenceInfo.ImageUrl)) { LtlImageUrl.Text = $@"<img id=""preview_imageUrl"" src=""{PageUtility.ParseNavigationUrl( PublishmentSystemInfo, conferenceInfo.ImageUrl)}"" width=""370"" align=""middle"" />"; } TbSummary.Text = conferenceInfo.Summary; if (!string.IsNullOrEmpty(conferenceInfo.BackgroundImageUrl)) { LtlBackgroundImageUrl.Text = $@"{ComponentsManager.GetBackgroundImageSelectHtml(PublishmentSystemInfo, conferenceInfo.BackgroundImageUrl)}<hr /><img id=""preview_backgroundImageUrl"" src=""{ComponentsManager .GetBackgroundImageUrl(PublishmentSystemInfo, conferenceInfo.BackgroundImageUrl)}"" width=""370"" align=""middle"" />"; } TbConferenceName.Text = conferenceInfo.ConferenceName; TbAddress.Text = conferenceInfo.Address; TbDuration.Text = conferenceInfo.Duration; BreIntroduction.Text = conferenceInfo.Introduction; CbIsAgenda.Checked = conferenceInfo.IsAgenda; TbAgendaTitle.Text = conferenceInfo.AgendaTitle; var agendaInfoList = new List <ConferenceAgendaInfo>(); agendaInfoList = TranslateUtils.JsonToObject(conferenceInfo.AgendaList, agendaInfoList) as List <ConferenceAgendaInfo>; if (agendaInfoList != null) { var agendaBuilder = new StringBuilder(); foreach (var agendaInfo in agendaInfoList) { agendaBuilder.AppendFormat(@"{{dateTime: '{0}', title: '{1}', summary: '{2}'}},", agendaInfo.DateTime, agendaInfo.Title, agendaInfo.Summary); } if (agendaBuilder.Length > 0) { agendaBuilder.Length--; } LtlAgendaScript.Text += $@"agendaController.agendaCount = {agendaInfoList.Count};agendaController.items = [{agendaBuilder}];"; } else { LtlAgendaScript.Text += "agendaController.agendaCount = 0;agendaController.items = [{}];"; } CbIsGuest.Checked = conferenceInfo.IsGuest; TbGuestTitle.Text = conferenceInfo.GuestTitle; var guestInfoList = new List <ConferenceGuestInfo>(); guestInfoList = TranslateUtils.JsonToObject(conferenceInfo.GuestList, guestInfoList) as List <ConferenceGuestInfo>; if (guestInfoList != null) { var guestBuilder = new StringBuilder(); foreach (var guestInfo in guestInfoList) { guestBuilder.AppendFormat(@"{{displayName: '{0}', position: '{1}', picUrl: '{2}'}},", guestInfo.DisplayName, guestInfo.Position, guestInfo.PicUrl); } if (guestBuilder.Length > 0) { guestBuilder.Length--; } LtlGuestScript.Text += $@"guestController.guestCount = {guestInfoList.Count};guestController.items = [{guestBuilder}];"; } else { LtlGuestScript.Text += "guestController.guestCount = 0;guestController.items = [{}];"; } TbEndTitle.Text = conferenceInfo.EndTitle; TbEndSummary.Text = conferenceInfo.EndSummary; if (!string.IsNullOrEmpty(conferenceInfo.EndImageUrl)) { LtlEndImageUrl.Text = $@"<img id=""preview_endImageUrl"" src=""{PageUtility.ParseNavigationUrl( PublishmentSystemInfo, conferenceInfo.EndImageUrl)}"" width=""370"" align=""middle"" />"; } ImageUrl.Value = conferenceInfo.ImageUrl; BackgroundImageUrl.Value = conferenceInfo.BackgroundImageUrl; EndImageUrl.Value = conferenceInfo.EndImageUrl; } BtnReturn.Attributes.Add("onclick", $@"location.href=""{PageConference.GetRedirectUrl(PublishmentSystemId)}"";return false"); } }