Example #1
0
        protected void Page_Load(object sender, EventArgs e)
        {
            string querystring = Request.QueryString["ID"];

            if (querystring != null)
            {
                if (!IsPostBack)
                {
                    loadDropDown(ddCategory, csql.getAnnouncementsCategory("SmartConcepcion"), true);
                    p_AnnouncementID = Convert.ToInt64(querystring);
                    p_dtAnnouncement = csql.getAnnouncementsInfo("SmartConcepcion", p_AnnouncementID.Value);

                    if (p_dtAnnouncement.Rows.Count > 0)
                    {
                        txtTitle.Text    = p_dtAnnouncement.Rows[0]["title"].ToString();
                        txtSubtitle.Text = p_dtAnnouncement.Rows[0]["subtitle"].ToString();
                        txtContent.Text  = p_dtAnnouncement.Rows[0]["body_content"].ToString();
                        txtDate.Text     = Convert.ToDateTime(p_dtAnnouncement.Rows[0]["publisheddate"].ToString()).ToString("yyyy-MM-ddTHH:mm:ss");

                        ddCategory.SelectedValue = p_dtAnnouncement.Rows[0]["category_code"].ToString();
                    }
                }
            }
            else
            {
                if (!IsPostBack)
                {
                    loadDropDown(ddCategory, csql.getAnnouncementsCategory("SmartConcepcion"), true);
                    pnlZone.Visible  = false;
                    p_AnnouncementID = null;
                }
            }
        }
Example #2
0
        protected void Page_Load(object sender, EventArgs e)
        {

            if (!IsPostBack)
            {
                dttemp = csql.getAnnouncementsCategory("SmartConcepcion");
                loadDropDown(ddFilterannouncementType, dttemp, true);
                loadannouncementProfile();
            }

        }