Esempio n. 1
0
 private void BindDocumentList()
 {
     try
     {
         DataSet ds = new DataSet();
         ds = _objDocumentBL.GetDocumentList(Session["SAID"].ToString(), 11, "0");
         if (ds.Tables.Count > 0 && ds.Tables[0].Rows.Count > 0)
         {
             gvDocumentsList.DataSource = ds.Tables[0];
             divDocument.Visible        = true;
         }
         else
         {
             gvDocumentsList.DataSource = null;
             divDocument.Visible        = false;
         }
         gvDocumentsList.PageSize = Convert.ToInt32(DropPageDocuments.SelectedValue);
         gvDocumentsList.DataBind();
     }
     catch
     {
         lblTitle.Text      = "Warning!";
         lblTitle.ForeColor = System.Drawing.Color.Red;
         message.ForeColor  = System.Drawing.Color.Red;
         message.Text       = "Sorry,Something went wrong, please contact administrator";
         ScriptManager.RegisterStartupScript(this, this.GetType(), "Pop", "openModal();", true);
     }
 }