protected void Page_Load(object sender, System.EventArgs e)
        {
            // Put user code to initialize the page here
            if (!this.Page.IsPostBack)
            {
                cboType.Items.Clear();
                cboType.DataSource     = UtilityProvider.GetCoreType();
                cboType.DataTextField  = "TypeName";
                cboType.DataValueField = "TypeId";

                cboRecycleBin.Items.Clear();
                cboRecycleBin.DataSource     = DataProcessingProvider.ProcessDataTable(UtilityProvider.GetTabs(this.PortalId, -1), 1, 2);
                cboRecycleBin.DataTextField  = "TabName";
                cboRecycleBin.DataValueField = "TabId";

                cboRelated.Items.Clear();
                cboRelated.DataSource     = DataProcessingProvider.ProcessDataTable(UtilityProvider.GetTabs(this.PortalId, -1), 1, 2);
                cboRelated.DataTextField  = "TabName";
                cboRelated.DataValueField = "TabId";

                cboTypeGroup.Items.Clear();
                cboTypeGroup.DataSource     = DataProcessingProvider.ProcessDataTable(UtilityProvider.GetTabs(this.PortalId, -1), 1, 2);
                cboTypeGroup.DataTextField  = "TabName";
                cboTypeGroup.DataValueField = "TabId";

                DataBind();
                ListItem li = new ListItem();
                li.Text  = "All";
                li.Value = "-1";
                cboType.Items.Insert(0, li);

                cboType.SelectedValue       = m_typeId.ToString();
                cboRecycleBin.SelectedValue = m_recyleBinLink.ToString();
                cboRelated.SelectedValue    = m_relatedLink.ToString();
                cboTypeGroup.SelectedValue  = m_tagGroupLink.ToString();
                txtTypeInclude.Text         = m_typeInclude;
                txtTypeReturn.Text          = m_typeReturn;


                #region Load Show Choice & Alt Text

                //Load show choice
                this.chkDip1.Checked = m_isShowDip1;
                this.chkDip2.Checked = m_isShowDip1;
                this.chkDip3.Checked = m_isShowDip1;
                this.chkDip4.Checked = m_isShowDip1;
                this.chkDip5.Checked = m_isShowDip1;

                //Load alt text
                this.txtDip1.Text = m_altSourceDip1;
                this.txtDip2.Text = m_altSourceDip2;
                this.txtDip3.Text = m_altSourceDip3;
                this.txtDip4.Text = m_altSourceDip4;
                this.txtDip5.Text = m_altSourceDip5;
                #endregion
            }
        }
Esempio n. 2
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (m_isPassOnce)
                    {
                        return;
                    }
                    aLinkUpload.HRef = m_linkUpload;

                    //Set DisplayDate to Today, Set ExpiredDate to ten years after.
                    this.txtDisplayDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
                    this.txtExpiredDate.Text = DateTime.Now.AddYears(10).ToString("dd/MM/yyyy");

                    //Load Categories
                    //if (m_Serviced == -1)
                    //{
                    this.chkCategoryList.DataSource     = DataProcessingProvider.ProcessDataTable(CategoryProvider.GetExcludedCategories(this.PortalId, -1, ServiceProvider.TypeId), 1, 2);
                    this.chkCategoryList.DataTextField  = "Name";
                    this.chkCategoryList.DataValueField = "CategoryId";
                    this.chkCategoryList.DataBind();
                    UIProvider.BindListBox(chkCategoryList, m_strCategories);
                    //}
                    //else
                    //{
                    //    TH.Core.Providers.Utilities.UIProvider.PopulateCategories(this.chkCategoryList, m_strCategories, ServiceProvider.TypeId, this.UserId, GetSuperMode(), true, m_Serviced);

                    //}
                    //Bind Data
                    if (m_Serviced != -1)
                    {
                        ImageBinding();
                    }


                    m_isPassOnce = true;
                }
            }
            catch (Exception ex)
            {
                lblError.Text         = ex.Message;
                this.lblError.Visible = true;
            }
        }
 protected void BindCboExcludedCategories(int TypeId)
 {
     try
     {
         this.cbCategories.Items.Clear();
         this.cbCategories.DataSource     = DataProcessingProvider.ProcessDataTable(CategoryProvider.GetExcludedCategories(this.PortalId, m_intCategoryId, TypeId), 1, 2);
         this.cbCategories.DataValueField = "CategoryId";
         this.cbCategories.DataTextField  = "Name";
         this.cbCategories.DataBind();
         this.cbCategories.Items.Insert(0, Localization.GetString("mssNoParent.Text", this.LocalResourceFile));
         this.cbCategories.Items[0].Value = "-1";
     }
     catch (Exception ex)
     {
         lblError.Text         = ex.Message;
         this.lblError.Visible = true;
     }
 }
Esempio n. 4
0
        protected void Page_Load(object sender, EventArgs e)
        {
            try
            {
                if (!IsPostBack)
                {
                    if (m_isPassOnce)
                    {
                        return;
                    }

                    //Set DisplayDate to Today, Set ExpiredDate to ten years after.
                    this.txtDisplayDate.Text = DateTime.Now.ToString("dd/MM/yyyy");
                    this.txtExpiredDate.Text = DateTime.Now.AddYears(10).ToString("dd/MM/yyyy");

                    this.txtProducedDate.Text = DateTime.Now.AddYears(10).ToString("dd/MM/yyyy");


                    txtWeight.Text   = "0";
                    txtPrice.Text    = "0";
                    txtPriceOld.Text = "0";
                    txtOrder.Text    = "100";

                    //Load Categories
                    //if (m_ProductId == -1)
                    //{
                    this.chkCategoryList.DataSource     = DataProcessingProvider.ProcessDataTable(CategoryProvider.GetExcludedCategories(this.PortalId, -1, ProductProvider.TypeId), 1, 2);
                    this.chkCategoryList.DataTextField  = "Name";
                    this.chkCategoryList.DataValueField = "CategoryId";
                    this.chkCategoryList.DataBind();
                    UIProvider.BindListBox(chkCategoryList, m_strCategories);

                    //Tag
                    this.chkTags.DataSource     = DotNetNuke.Data.DataProvider.Instance().ExecuteDataSet("THCore_CM_GetTags", this.PortalId, 3).Tables[0];
                    this.chkTags.DataTextField  = "Name";
                    this.chkTags.DataValueField = "TagID";
                    this.chkTags.DataBind();
                    UIProvider.BindListBox(chkTags, m_strTags);

                    //}
                    //else
                    //{
                    //    TH.Core.Providers.Utilities.UIProvider.PopulateCategories(this.chkCategoryList, m_strCategories, ProductProvider.TypeId, this.UserId, GetSuperMode(), true, m_ProductId);

                    //}
                    //Bind Data
                    if (m_ProductId != -1)
                    {
                        ProductBinding();
                    }


                    m_isPassOnce = true;
                }
            }
            catch (Exception ex)
            {
                lblError.Text         = ex.Message;
                this.lblError.Visible = true;
            }
        }