private void BindData() { YMC.BLL.Departements objData = new YMC.BLL.Departements(); objData.LoadAll(); uiDataListDepts.DataSource = objData.DefaultView; uiDataListDepts.DataBind(); }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { if (Request.QueryString["did"] != null && !string.IsNullOrEmpty(Request.QueryString["did"])) { uiPanelViewAllPages.Visible = false; uiPanelEdit.Visible = true; int id = Convert.ToInt32(Request.QueryString["did"].ToString()); YMC.BLL.Departements currentdept = new YMC.BLL.Departements(); currentdept.LoadByPrimaryKey(id); uiLabelTitle.Text = currentdept.Name; uiLiteralContent.Text = Server.HtmlDecode(currentdept.DetailsArabic); } else { uiPanelViewAllPages.Visible = true; uiPanelEdit.Visible = false; BindData(); } } }