private void LoadCategory()
 {
     objCategoryBLL             = new BLL.CategoryBLL();
     ddlCategory.DataSource     = objCategoryBLL.GetCategory();
     ddlCategory.DataTextField  = "CategoryName";
     ddlCategory.DataValueField = "CategoryId";
     ddlCategory.DataBind();
     ddlCategory.Items.Insert(0, "--Select Category--");
 }
示例#2
0
 protected void Page_Load(object sender, EventArgs e)
 {
     try
     {
         if (!this.IsPostBack)
         {
             objCategoryBLL             = new BLL.CategoryBLL();
             ddlCategory.DataSource     = objCategoryBLL.GetCategory();
             ddlCategory.DataTextField  = "CategoryName";
             ddlCategory.DataValueField = "CategoryId";
             ddlCategory.DataBind();
             ddlCategory.Items.Insert(0, "--Select Category--");
             lblMsg.Text = "";
         }
     }
     catch (Exception ex)
     {
     }
 }
示例#3
0
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!this.IsPostBack)
            {
                objCategoryBLL             = new BLL.CategoryBLL();
                ddlCategory.DataSource     = objCategoryBLL.GetCategory();
                ddlCategory.DataTextField  = "CategoryName";
                ddlCategory.DataValueField = "CategoryId";
                ddlCategory.DataBind();
                ddlCategory.Items.Insert(0, "--Select Category--");

                DataTable tab = new DataTable();
                objPublishBLL    = new BLL.PublishContentBLL();
                objPublishDTO    = new DTO.PublishContentDTO();
                PublishContentId = Int64.Parse(Request.QueryString["PublishContentId"]);
                objPublishDTO.PublishContentID = PublishContentId;
                tab = objPublishBLL.GetPublishContent_ID(objPublishDTO);
                ddlCategory.SelectedValue = tab.Rows[0]["CategoryID"].ToString();
                txtTitle.Text             = tab.Rows[0]["Title"].ToString();
                txtSubTitle.Text          = tab.Rows[0]["SubTitle"].ToString();
                txtDespcription.Value     = tab.Rows[0]["Description"].ToString();
            }
            //LoadContent();
        }