Beispiel #1
0
 protected void btnSubmit_Click(object sender, EventArgs e)
 {
     PublisherSubcriberNotification.DTO.CategoryDTO objCatgeoryDTO = new DTO.CategoryDTO();
     objCategoryBLL = new BLL.CategoryBLL();
     try
     {
         objCatgeoryDTO.CategoryName        = txtCategoryname.Text;
         objCatgeoryDTO.CategoryDescription = txtCategoryDescription.Text;
         string result = objCategoryBLL.CreateCategory(objCatgeoryDTO);
         if (result == "1")
         {
             txtCategoryname.Text = txtCategoryDescription.Text = "";
             lblMsg.Text          = "Category Created Successfully";
             lblMsg.ForeColor     = System.Drawing.Color.Green;
         }
         else
         {
             lblMsg.ForeColor = System.Drawing.Color.Red;
             lblMsg.Text      = "Category Creation Fail";
         }
     }
     catch (Exception ex)
     {
     }
 }
 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--");
 }
Beispiel #3
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)
     {
     }
 }
Beispiel #4
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();
        }