Exemplo n.º 1
0
 protected override void InitializeSkin(System.Web.UI.Control skin)
 {
     txtContent = (TextBox)skin.FindControl("TextBox1");
     btnOK = (Button)skin.FindControl("Button1");
     txtContent.Text = BWeblog_Notice.GetLatestNotice().Notice_Content;
     btnOK.Click += new EventHandler(btnOK_Click);
 }
Exemplo n.º 2
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     repeater1 = (RepeaterPaged)Skin.FindControl("repeater1");
     TextBox1 = (TextBox)Skin.FindControl("TextBox1");
     LinkButton1 = (LinkButton)Skin.FindControl("LinkButton1");
     LinkButton1.Click += new EventHandler(LinkButton1_Click);
     DataBind();
     if (blogContext.ID != -1)
     {
         if (BView_WeblogThemeCssFile.CheckExist(blogContext.ID))
         {
             if (!BWeblog_UserCss.CheckHasCssFile(blogContext.BlogUserId))
             {
                 Weblog_UserCss WUC = new Weblog_UserCss();
                 WUC.UserCss_CssFileId = blogContext.ID;
                 WUC.UserCss_UserId = blogContext.BlogUserId;
                 WUC.UserCss_Used = true;
                 BWeblog_UserCss.Insert(WUC);
             }
             else//如果已经有了的话 更新
             {
                 var temp= BWeblog_UserCss.GetByBlogUserId(blogContext.BlogUserId);
                 
                 Weblog_UserCss WUC = new Weblog_UserCss();
                 WUC.UserCss_Id = temp.First().UserCss_Id;
                 WUC.UserCss_CssFileId = blogContext.ID;
                 WUC.UserCss_UserId = blogContext.BlogUserId;
                 WUC.UserCss_Used = true;
                 BWeblog_UserCss.Update(WUC);
             }
             Context.Response.Redirect("/" + blogContext.Owner.User_DomainName);
         }
     }
 }
Exemplo n.º 3
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     LogTitle = (TextBox)Skin.FindControl("LogTitle");
     Search = (Button)Skin.FindControl("Search");
     Search.Click += new EventHandler(Search_Click);
     //throw new NotImplementedException();
 }
Exemplo n.º 4
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     Repeater1 = (Repeater)Skin.FindControl("Repeater1");
     Button1 = (Button)Skin.FindControl("Button1");
     Button1.Click += new EventHandler(Button1_Click);
     DataBind();
 }
Exemplo n.º 5
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
          //if(Context.Session["PassWord"]==null||Convert.ToString(Context.Session["PassWord"])=="")
          //{
              
          //    Context.Response.Redirect("Index.aspx?mfiid="+BlogContext.Current.MFiiD+"&afiid="+BlogContext.Current.AFiiD);

          //}
            //if (Convert.ToString(Context.Session["PassWord"]) != BWeblog_log.GetPW(Convert.ToInt32( Context.Request["logid"])))
            //{
            //    Context.Response.Redirect("Index.aspx?mfiid=" + BlogContext.Current.MFiiD + "&afiid=" + BlogContext.Current.AFiiD);
            //}
            EnReply = (Panel)Skin.FindControl("EnReply");
            ReplyAlert = (Literal)Skin.FindControl("ReplyAlert");
            View_WeblogUserLog WL = BWeblog_log.GetByIDAndFiid(blogContext.LogId,blogContext.MFiiD);
            if (WL == null)
            {
                Context.Response.Write("<script>alert('该文章不存在或已经删除!');top.window.location='/" + blogContext.Context.Request.QueryString["Domain"] + "';</script>");
                Context.Response.End();
            }
            if (Convert.ToBoolean(WL.Log_IsEnRePly))
            {
                EnReply.Visible = true;
                ReplyAlert.Visible = false;
            }
            else
            {
                EnReply.Visible = false;
                ReplyAlert.Visible = true;
            }

            Globals.UpdateLogByRssLink(blogContext.BlogUserId);
        }
Exemplo n.º 6
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     repeater1 = (Repeater)Skin.FindControl("repeater1");
     AddCategory = (Button)Skin.FindControl("AddCategory");
     Cate_Name = (TextBox)Skin.FindControl("Cate_Name");
     AddCategory.Click += new EventHandler(AddCategory_Click);
     DataBind();
 }
Exemplo n.º 7
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     TextBox1 = (TextBox)Skin.FindControl("TextBox1");
     Button1 = (Button)Skin.FindControl("Button1");
     Label1 = (Label)Skin.FindControl("Label1");
     Button1.Click += new EventHandler(Button1_Click);
     //throw new NotImplementedException();
 }
Exemplo n.º 8
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
    
     CommentName = (TextBox)Skin.FindControl("CommenterName");
     CommentContent = (TextBox)Skin.FindControl("CommentContext");
     YanZhen = (TextBox)Skin.FindControl("YanZhen");
     Add = (Button)Skin.FindControl("Add");
     Cansel = (Button)Skin.FindControl("Cansel");
    
     DataBind();
 }
Exemplo n.º 9
0
        //private string querry;


        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {

            //throw new NotImplementedException();

            InputName = (TextBox)Skin.FindControl("Name");
            Search = (Button)Skin.FindControl("Search1");
            DataBind();


        }
Exemplo n.º 10
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            
            Repeater1 = (Repeater)Skin.FindControl("Repeater1");
            MsgReceiver = (TextBox)Skin.FindControl("MsgReceiver");

            Send = (Button)Skin.FindControl("Send");
            MsgTitle = (TextBox)Skin.FindControl("MsgTitle");
            MsgContent = (TextBox)Skin.FindControl("MsgContent");
            Send.Click += new EventHandler(Send_Click);
            DataBind();
        }
Exemplo n.º 11
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            UserName = (TextBox)Skin.FindControl("UserName");
          Password = (TextBox)Skin.FindControl("Password");
          CheckBox1 = (CheckBox)Skin.FindControl("CheckBox1");
          LinkButton1 = (LinkButton)Skin.FindControl("LinkButton1");
          Label1 = (Label)Skin.FindControl("Label1");

            //保存上一次访问的跳转前的Url
          //Uri url = System.Web.HttpContext.Current.Request.UrlReferrer;
          //Context.Response.Write("我来测试一下~~"+url);
          //if (url != null)
          //{
          //    string UrlStr = url.ToString().ToLower();
          //    if (!UrlStr.Contains("blog.ncuhome.cn/firend.aspx"))
          //    {
          ////        if(UrlStr.Contains("blog.ncuhome.cn/manage"))
          ////            if (UrlStr != "http://blog.ncuhome.cn" && UrlStr != "http://blog.ncuhome.cn/" && UrlStr != "http://blog.ncuhome.cn/default.aspx" && UrlStr != "http://blog.ncuhome.cn/manage" && UrlStr != "http://blog.ncuhome.cn/manage/default.aspx")
          ////        {
          //        HttpContext.Current.Session["UrlStr"] = UrlStr;
          ////        }
          ////            else
          ////            {
          ////                HttpContext.Current.Session["UrlStr"] = null;
          ////            }
          //    }
          //    else
          //    {
          //        HttpContext.Current.Session["UrlStr"] = null;
          //    }
          //}
          LinkButton1.Click += new EventHandler(LinkButton1_Click);
          if (blogContext.User.IsLogin)
          {
              BWeblog_User.AddLoginTimes(blogContext.User.UserInfo.User_Id);
              if (BView_WeblogThemeDetail.GetByBlogUserId(blogContext.User.UserInfo.User_Id)==null)
              {
                  HttpContext.Current.Response.Write("<script>alert('您还没有设置您的个性模板!');window.location='/" + blogContext.User.UserInfo.User_DomainName + "/Manage/selecttheme.aspx';</script>");
                  HttpContext.Current.Response.End();
              }
              if (HttpContext.Current.Session["toDomain"] != null)
              {
                  string RedDomain=Convert.ToString(HttpContext.Current.Session["toDomain"]);
                  HttpContext.Current.Session["toDomain"] = null;
                  System.Web.HttpContext.Current.Response.Redirect("/Manage/sendmessage/" + blogContext.User.UserInfo.User_DomainName + "-to-" + RedDomain + ".html");
              }
              else
              {
                  System.Web.HttpContext.Current.Response.Redirect("/" + blogContext.User.UserInfo.User_DomainName + "/Manage/Default.aspx");
              }
          }

        }
Exemplo n.º 12
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            MsgReceiver = (TextBox)Skin.FindControl("MsgReceiver");

            Send = (Button)Skin.FindControl("Send");
            MsgTitle = (TextBox)Skin.FindControl("MsgTitle");
            MsgContent = (TextBox)Skin.FindControl("MsgContent");
            Literal1 = (Literal)Skin.FindControl("Literal1");
            if (blogContext.ID != -1)
                MsgReceiver.Text = BWeblog_User.GetByFIID(blogContext.ID).User_NickName;
            Send.Click += new EventHandler(Send_Click);
            DataBind();
        }
Exemplo n.º 13
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            CT = (TextBox)Skin.FindControl("Article");
            Alert = (Literal)Skin.FindControl("Literal1");
            Submit = (Button)Skin.FindControl("Submit");
            var Content=BNotice.GetNotice(blogContext.MFiiD);
            if (Content.Length > 0)
            {
                CT.Text = Content[0].Ntc_Content;
            }
            //CT.Text = Convert.ToString( BNotice.GetNotice(blogContext.MFiiD));

            Submit.Click += new EventHandler(Submit_Click);
            
        }
Exemplo n.º 14
0
        public static void modify_leftnav(System.Web.UI.Page page, StringCollection items_visible, StringCollection items_invisible)
        {
            Control leftnav = page.FindControl("leftnavElement");

            if (leftnav != null)
            {
                foreach (Control td_c in leftnav.Controls)
                {
                    if (td_c.ID != null)
                    {
                        bool helper = false;

                        foreach (string id in items_visible)
                        {
                            if (td_c.ID.StartsWith(id) == true)
                            {
                                helper = true;
                            }
                        }


                        if (items_invisible.Contains(td_c.ID))
                        {
                            helper = false;
                        }

                        td_c.Visible = helper;
                    }
                }
            }
        }
Exemplo n.º 15
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     if (Context.Request["DeleteCommentId"] != null)
     {
         if (BWeblog_Comment.DeleteByID(Convert.ToInt32(Context.Request["DeleteCommentId"])))
         {
             BWeblog_User.SetUserCommentCount(blogContext.BlogUserId);
             BWeblog_log.SetLogCountByUID(blogContext.BlogUserId);
             Context.Response.Write("<script>alert('删除成功!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>");
         }
         else
         {
             Context.Response.Write("<script>alert('删除失败!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/Comments-" + blogContext.LogId + ".aspx';</script>");
         }
     }
     repeater1 = (RepeaterPaged)Skin.FindControl("Repeater1");
     if (Context.Request["logid"] != null)
     {
         DataBind();
     }
     else
     {
         System.Web.HttpContext.Current.Response.Redirect("/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx");
     }
     //else
     //{
     //    Context.Response.Write("<script>alert('你没有权限!');</script>");
     //    Context.Response.End();
     //}
 }
Exemplo n.º 16
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            repeater1 = (RepeaterPaged)Skin.FindControl("repeater1");
            //InputName = (TextBox)Skin.FindControl("Name");
            //Search = (Button)Skin.FindControl("Search1");

            DataBind();
        }
Exemplo n.º 17
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            CommentRepeater = (Repeater)Skin.FindControl("NewComment");
            //CommentRepeater.DataSource = BView_WeblogUserComment.GetTopCommentByLogUID(blogContext.BlogUserId);
            CommentRepeater.DataSource = BGetCommentInfoByLogId.GetTopCommentByLogUID(blogContext.BlogUserId);
            CommentRepeater.DataBind();

            //throw new NotImplementedException();
        }
		public override bool UpdateItem(ContentItem item, System.Web.UI.Control editor)
		{
			var cbManual = editor.FindControl(Name + "_ManualSummary") as CheckBox;
			if (cbManual != null)
			{
				item[Name + "_ManualSummary"] = cbManual.Checked ? (object)true : null;
			}

			return base.UpdateItem(item, editor);
		}
Exemplo n.º 19
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            RepeaterPaged1 = (RepeaterPaged)Skin.FindControl("RepeaterPaged1");
            MoveCategory = (Button)Skin.FindControl("MoveCategory");
            DropDownList1 = (DropDownList)Skin.FindControl("DropDownList1");
            DropDownList2 = (DropDownList)Skin.FindControl("DropDownList2");

            if (!IsDraft)
            {

                DropDownList1.SelectedIndexChanged += new EventHandler(DropDownList1_SelectedIndexChanged);
                DropDownList1.AutoPostBack = true;
                DropDownList1.DataBound += new EventHandler(DropDownList1_DataBound);
                DropDownList2.DataBound += new EventHandler(DropDownList2_DataBound);
                MoveCategory.Click += new EventHandler(MoveCategory_Click);

            }
            else
            {
                MoveCategory.Enabled = false;
            }
            if (Context.Request["DeleteLogId"]!=null)
            {
                if (BWeblog_log.DeleteByID(Convert.ToInt32(Context.Request["DeleteLogId"])))
                {
                    BWeblog_User.SetUserCommentCount(blogContext.BlogUserId);
                    BWeblog_log.SetLogCountByUID(blogContext.BlogUserId);
                    Context.Response.Write("<script>alert('删除成功!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx';</script>");
                    Context.Response.End();
                }
                else
                {
                    Context.Response.Write("<script>alert('删除失败!');window.location='/" + blogContext.Owner.User_DomainName + "/Manage/logs.aspx';</script>");
                    Context.Response.End();
                    
                }
            }
            ListDataBind();
        }
Exemplo n.º 20
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            Repeater1 = (RepeaterPaged)Skin.FindControl("RepeaterPaged1");

            SearchByXH = (TextBox)Skin.FindControl("XH");
            SearchByNickName = (TextBox)Skin.FindControl("NickName");
            SearchByName = (TextBox)Skin.FindControl("Name");
            SearchByQQ = (TextBox)Skin.FindControl("QQ");

            DropXY = (DropDownList)Skin.FindControl("DropDownList1");
            DropZY = (DropDownList)Skin.FindControl("DropDownList2");

            RadioList = (RadioButtonList)Skin.FindControl("RadioButtonList1");

            Source1 = (SqlDataSource)Skin.FindControl("SqlDataSource3");

            SearchButton1 = (Button)Skin.FindControl("Search1");

            ListItem ValueNull = new ListItem();

            ValueNull.Value = "null";

            DropZY.Items.Add(ValueNull);
            DropZY.Items.FindByValue("null").Selected = true;
            DropXY.Items.Add(ValueNull);
            DropXY.Items.FindByValue("null").Selected = true;

            SearchButton1.Click += new EventHandler(SearchButton1_Click);

            if (!Page.IsPostBack)
            {
                Repeater1.Count = 0;
            }

            Repeater1.Length = 5;
            Repeater1.UrlFormat = "AddFriend.aspx?mfiid=" + blogContext.MFiiD.ToString() + "&";

            querry = "select * from View_WeblogUserXSJBXX where [XB]='" + RadioList.SelectedValue + "'";
        }
Exemplo n.º 21
0
       //private Int32 PageIndex=1;
       
              

       protected override void InitializeSkin(System.Web.UI.Control Skin)
       {


           RP = (RepeaterPaged)Skin.FindControl("RepeaterPaged1");
           Theme = (Literal)Skin.FindControl("Literal1");
           //if (Context.Request.QueryString["pageindex"] != "")
           //{
           //    PageIndex = Context.Request.QueryString["pageindex"];
           //}
           RP.Length = 7;
           RP.Count = BWeblog_RecommendTheme.GetAllThemeId().Count() * 7;
           RP.UrlFormat = "default.aspx?";

          int[] array= BWeblog_RecommendTheme.GetAllThemeId();
                       
           RP.DataSource = BView_WeblogUserRecommend.GetByPageIndex(array[blogContext.PageIndex-1],7);
           RP.DataBind();
           Weblog_RecommendTheme WRT = BWeblog_RecommendTheme.GetByPageIndex(array[blogContext.PageIndex - 1]);
           Theme.Text = WRT.Reco_Title+WRT.Reco_Content;  

       }
Exemplo n.º 22
0
 protected override void InitializeSkin(System.Web.UI.Control Skin)
 {
     UserHeads = (Image)Skin.FindControl("UserHead");
     //Repeater1 = (Repeater)Skin.FindControl("Repeater1");
     if (BWeblog_User.GetByID(Convert.ToInt32(BlogContext.Current.Owner.User_Id)).User_PortraitUrl==null)
     {
         UserHeads.ImageUrl = "/images/defaulthead.gif";
     }
     else
     {
         UserHeads.ImageUrl = "http://resource.ncuhome.cn/Blog/ThumbnailImage/UserHead/" + BWeblog_User.GetByID(Convert.ToInt32(BlogContext.Current.Owner.User_Id)).User_PortraitUrl.ToString();
     }
     DataBind();
 }
Exemplo n.º 23
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            SearchByXH = (TextBox)Skin.FindControl("XH");
            SearchByNickName = (TextBox)Skin.FindControl("NickName");
            SearchByName = (TextBox)Skin.FindControl("Name");
            SearchByQQ = (TextBox)Skin.FindControl("QQ");

            DropXY = (DropDownList)Skin.FindControl("DropDownList1");
            DropZY = (DropDownList)Skin.FindControl("DropDownList2");

            RadioList = (RadioButtonList)Skin.FindControl("RadioButtonList1");

            Source1 = (SqlDataSource)Skin.FindControl("SqlDataSource3");
            SearchButton1 = (Button)Skin.FindControl("Search1");


            DropXY.DataBound += new EventHandler(DropXY_DataBound);
            DropZY.DataBound += new EventHandler(DropZY_DataBound);

            SearchButton1.Click += new EventHandler(SearchButton1_Click);
            RepeaterPaged1 = (RepeaterPaged)Skin.FindControl("RepeaterPaged1");
            DataBind();
        }
Exemplo n.º 24
0
 /// <summary>
 /// Gets the post back control.
 /// </summary>
 /// <param name="page">The page.</param>
 /// <returns>System.Web.UI.Control</returns>
 public static System.Web.UI.Control GetPostBackControl(System.Web.UI.Page page)
 {
     Control objControl = null;
     string strCtrlname = page.Request.Params["__EVENTTARGET"];
     if (!string.IsNullOrEmpty(strCtrlname))
     {
         objControl = page.FindControl(strCtrlname);
     }
     // if __EVENTTARGET is null, the control is a button type and we need to
     // iterate over the form collection to find it
     else
     {
         string strCtrl = String.Empty;
         Control objCtrl = null;
         foreach (string strCtl in page.Request.Form)
         {
             // handle ImageButton controls ...
             if (strCtl.EndsWith(".x") || strCtl.EndsWith(".y"))
             {
                 strCtrl = strCtl.Substring(0, strCtl.Length - 2);
                 objCtrl = page.FindControl(strCtrl);
             }
             else
             {
                 objCtrl = page.FindControl(strCtl);
             }
             if (objCtrl is System.Web.UI.WebControls.Button ||
                      objCtrl is System.Web.UI.WebControls.ImageButton)
             {
                 objControl = objCtrl;
                 break;
             }
         }
     }
     return objControl;
 }
Exemplo n.º 25
0
        public override void UpdateEditor(ContentItem item, System.Web.UI.Control editor)
        {
            base.UpdateEditor(item, editor);

            if (editor.FindControl(editor.ID + "_preview") != null)
                return;

            var preview = new HyperLink()
            {
                ID = editor.ID + "_preview",
                Text = "Preview",
                NavigateUrl = "#"
            };
            preview.Attributes["onclick"] = "window.open('" + N2.Web.Url.Parse(item.Url).AppendQuery("theme", "") + "' + document.getElementById('" + editor.ClientID + "').value, 'previewTheme', 'width=900,height=500'); return false;";
            editor.Parent.Controls.AddAt(editor.Parent.Controls.IndexOf(editor) + 1, preview);
        }
Exemplo n.º 26
0
        public static void Set_titles(System.Web.UI.Page page, string page_title)
        {



            Control headerElement = page.FindControl("headerElement");


            Literal htmltitle = (Literal)(headerElement.FindControl("htmltitle"));
            Literal pagetitle = (Literal)(headerElement.FindControl("pagetitle"));



            htmltitle.Text = page_title;
            pagetitle.Text = page_title;

        }
		public override void UpdateEditor(ContentItem item, System.Web.UI.Control editor)
		{
			base.UpdateEditor(item, editor);
			
			var cbManual = editor.FindControl(Name + "_ManualSummary") as CheckBox;
			if (cbManual != null)
			{
				cbManual.Checked = IsManualSummary(item);
				if (!cbManual.Checked)
				{
					var tb = (TextBox)editor;
					tb.ReadOnly = true;
					tb.Enabled = false;
					tb.CssClass += " autogenerated";
				}
			}
		}
Exemplo n.º 28
0
        protected override void InitializeSkin(System.Web.UI.Control Skin)
        {
            LogIdTex = (TextBox)Skin.FindControl("LogId");
            Title = (TextBox)Skin.FindControl("title");
            CateName = (TextBox)Skin.FindControl("Cate_Name");
            Add = (Button)Skin.FindControl("Add");
            AddDraft = (Button)Skin.FindControl("AddDraft");
            Cansel = (Button)Skin.FindControl("Cansel");
            AddCategory = (Button)Skin.FindControl("AddCategory");
            Editor = (LionSky.WebControls.WebHtmlEditor)Skin.FindControl("WebHtmlEditor1");

            if(blogContext.Action!=null&& blogContext.Action.ToLower()=="edit")
            if ((!Page.IsPostBack)&&(blogContext.LogId!=-1))
            {
                Add.Text = "发表修改";
                CDES1 c=new CDES1();
                LogIdTex.Text = c.Encrypt1(blogContext.LogId.ToString());  //加密以免有人修改
                Weblog_Log l = BWeblog_log.GetWithDraftByID(blogContext.LogId);
                Title.Text = l.Log_Title;
                Editor.Html = l.Log_Content;
            }
            DataBind();
        }
Exemplo n.º 29
0
        protected Control GetControlObjThatCausedPostBack(System.Web.UI.Page page)
        {
            Control control = null;

            string ctrlname = page.Request.Params["__EVENTTARGET"];
            if (!string.IsNullOrEmpty(ctrlname))
            {
                control = page.FindControl(ctrlname);
            }
            // if __EVENTTARGET is null, the control is a button type and we need to
            // iterate over the form collection to find it
            else
            {
                string ctrlStr = String.Empty;
                Control c = null;
                foreach (string ctl in page.Request.Form)
                {
                    //handle ImageButton they having an additional "quasi-property" in their Id which identifies
                    //mouse x and y coordinates
                    if (ctl.EndsWith(".x") || ctl.EndsWith(".y"))
                    {
                        ctrlStr = ctl.Substring(0, ctl.Length - 2);
                        c = page.FindControl(ctrlStr);
                    }
                    else
                    {
                        c = page.FindControl(ctl);
                    }
                    if (c is System.Web.UI.WebControls.Button ||
                        c is System.Web.UI.WebControls.ImageButton)
                    {
                        control = c;
                        break;
                    }
                }
            }
            return control;
        }
Exemplo n.º 30
0
        public Catalog.OptionSelection ParseFromPlaceholder(Option baseOption, System.Web.UI.WebControls.PlaceHolder ph)
        {
            OptionSelection result = new OptionSelection();
            result.OptionBvin = baseOption.Bvin;

            System.Web.UI.WebControls.DropDownList ddl = (System.Web.UI.WebControls.DropDownList)ph.FindControl("opt" + baseOption.Bvin.Replace("-", ""));
            if (ddl != null)
            {
                if (ddl.SelectedItem != null)
                {
                    // Why was I parsing Guid only to return as string?
                    // Safety check maybe?
                    //result.SelectionData = new System.Guid(ddl.SelectedItem.Value).ToString();

                    // Removed GUID requirement for BVC2004 migration compatibility
                    string temp = ddl.SelectedItem.Value;
                    result.SelectionData = temp;
                    
                }
            }

            return result;
        }