예제 #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int blogid = Convert.ToInt32(Request.QueryString["blogid"]);
            Johnny.CMS.BLL.SeH.Blog bll = new Johnny.CMS.BLL.SeH.Blog();
            Johnny.CMS.OM.SeH.Blog model = bll.GetModel(blogid);

            if (model != null)
            {
                lblTitle.Text = model.Title;
                lblUpdateTime.Text = DataConvert.GetString(model.UpdatedTime);
                lblDescription.Text = model.Content;
            }
         }
예제 #2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            int blogid = Convert.ToInt32(Request.QueryString["blogid"]);

            Johnny.CMS.BLL.SeH.Blog bll   = new Johnny.CMS.BLL.SeH.Blog();
            Johnny.CMS.OM.SeH.Blog  model = bll.GetModel(blogid);

            if (model != null)
            {
                lblTitle.Text       = model.Title;
                lblUpdateTime.Text  = DataConvert.GetString(model.UpdatedTime);
                lblDescription.Text = model.Content;
            }
        }
예제 #3
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!this.IsPostBack)
            {
                litPageTitle.Text     = GetLabelText("Blog_Title");
                litCategory.Text      = GetLabelText("Blog_BlogCategoryId");
                ddlCategory.ToolTip   = GetLabelText("Blog_BlogCategoryId");
                litTitle.Text         = GetLabelText("Blog_Title");
                txtTitle.ToolTip      = GetLabelText("Blog_Title");
                litTag.Text           = GetLabelText("Blog_Tag");
                txtTag.ToolTip        = GetLabelText("Blog_Tag");
                litContent.Text       = GetLabelText("Blog_Content");
                litHits.Text          = GetLabelText("Blog_Hits");
                txtHits.ToolTip       = GetLabelText("Blog_Hits");
                litIsDisplay.Text     = GetLabelText("Blog_IsDisplay");
                rdbDisplay0.Text      = GetLabelText("Common_Yes");
                rdbDisplay1.Text      = GetLabelText("Common_No");
                litRdbDisplayTip.Text = GetLabelText("Blog_IsDisplay");
                litCreatedTime.Text   = GetLabelText("Common_CreatedTime");
                litCreatedByName.Text = GetLabelText("Common_CreatedByName");
                litUpdatedTime.Text   = GetLabelText("Common_UpdatedTime");
                litUpdatedByName.Text = GetLabelText("Common_UpdatedByName");

                if (Request.QueryString["action"] == "modify")
                {
                    //get id
                    int BlogId = Convert.ToInt32(Request.QueryString["id"]);

                    Johnny.CMS.BLL.SeH.Blog bll   = new Johnny.CMS.BLL.SeH.Blog();
                    Johnny.CMS.OM.SeH.Blog  model = new Johnny.CMS.OM.SeH.Blog();
                    model = bll.GetModel(BlogId);

                    CreateddlCategory();
                    foreach (ListItem item in ddlCategory.Items)
                    {
                        if (DataConvert.GetInt32(item.Value) == model.BlogCategoryId)
                        {
                            item.Selected = true;
                            break;
                        }
                    }

                    txtTitle.Text    = model.Title;
                    txtTag.Text      = model.Tag;
                    fckContent.Value = model.Content;
                    txtHits.Text     = DataConvert.GetString(model.Hits);
                    if (model.IsDisplay)
                    {
                        rdbDisplay0.Checked = true;
                    }
                    else
                    {
                        rdbDisplay1.Checked = true;
                    }

                    lblCreatedTime.Text   = DataConvert.GetLongDateString(model.CreatedTime);
                    lblCreatedByName.Text = model.CreatedByName;
                    lblUpdatedTime.Text   = DataConvert.GetLongDateString(model.UpdatedTime);
                    lblUpdatedByName.Text = model.UpdatedByName;

                    btnAdd.ButtonType = Johnny.Controls.Web.Button.Button.EnumButtonType.Save;
                    //btnAdd.Text = CONST_BUTTONTEXT_SAVE;
                }
                else
                {
                    CreateddlCategory();
                    rdbDisplay0.Checked = true;
                    txtHits.Text        = "0";
                }
            }
        }
예제 #4
0
        protected override void Page_Load(object sender, EventArgs e)
        {
            base.Page_Load(sender, e);

            if (!this.IsPostBack)
            {
                litPageTitle.Text = GetLabelText("Blog_Title");
                litCategory.Text = GetLabelText("Blog_BlogCategoryId");
                ddlCategory.ToolTip = GetLabelText("Blog_BlogCategoryId");
                litTitle.Text = GetLabelText("Blog_Title");
                txtTitle.ToolTip = GetLabelText("Blog_Title");
                litTag.Text = GetLabelText("Blog_Tag");
                txtTag.ToolTip = GetLabelText("Blog_Tag");
                litContent.Text = GetLabelText("Blog_Content");
                litHits.Text = GetLabelText("Blog_Hits");
                txtHits.ToolTip = GetLabelText("Blog_Hits");
                litIsDisplay.Text = GetLabelText("Blog_IsDisplay");
                rdbDisplay0.Text = GetLabelText("Common_Yes");
                rdbDisplay1.Text = GetLabelText("Common_No");
                litRdbDisplayTip.Text = GetLabelText("Blog_IsDisplay");
                litCreatedTime.Text = GetLabelText("Common_CreatedTime");
                litCreatedByName.Text = GetLabelText("Common_CreatedByName");
                litUpdatedTime.Text = GetLabelText("Common_UpdatedTime");
                litUpdatedByName.Text = GetLabelText("Common_UpdatedByName");

                if (Request.QueryString["action"] == "modify")
                {
                    //get id
                    int BlogId = Convert.ToInt32(Request.QueryString["id"]);

                    Johnny.CMS.BLL.SeH.Blog bll = new Johnny.CMS.BLL.SeH.Blog();
                    Johnny.CMS.OM.SeH.Blog model = new Johnny.CMS.OM.SeH.Blog();
                    model = bll.GetModel(BlogId);

                    CreateddlCategory();
                    foreach (ListItem item in ddlCategory.Items)
                    {
                        if (DataConvert.GetInt32(item.Value) == model.BlogCategoryId)
                        {
                            item.Selected = true;
                            break;
                        }
                    }

                    txtTitle.Text = model.Title;
                    txtTag.Text = model.Tag;
                    fckContent.Value = model.Content;
                    txtHits.Text = DataConvert.GetString(model.Hits);
                    if (model.IsDisplay)
                        rdbDisplay0.Checked = true;
                    else
                        rdbDisplay1.Checked = true;
                    
                    lblCreatedTime.Text = DataConvert.GetLongDateString(model.CreatedTime);
                    lblCreatedByName.Text = model.CreatedByName;
                    lblUpdatedTime.Text = DataConvert.GetLongDateString(model.UpdatedTime);
                    lblUpdatedByName.Text = model.UpdatedByName;

                    btnAdd.ButtonType = Johnny.Controls.Web.Button.Button.EnumButtonType.Save;
                    //btnAdd.Text = CONST_BUTTONTEXT_SAVE;
                }
                else
                {
                    CreateddlCategory();
                    rdbDisplay0.Checked = true;
                    txtHits.Text = "0";
                }
            }
        }