Ejemplo n.º 1
0
        private void BindPurpose()
        {
            objAttachmentcls = new AttachmentCls();
            DataTable dt = objAttachmentcls.GetALLPurpose();

            ddlPurpose.DataSource     = dt;
            ddlPurpose.DataTextField  = "PurposeDescription";
            ddlPurpose.DataValueField = "PurposeCode";
            ddlPurpose.DataBind();
        }
Ejemplo n.º 2
0
 private void BindGrid()
 {
     try
     {
         objAttachmentcls = new AttachmentCls();
         DataTable dt = objAttachmentcls.GetALLPurpose();
         if (dt.Rows.Count > 0)
         {
             gvData.DataSource = dt;
             gvData.DataBind();
         }
         else
         {
             ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Data not found');", true);
         }
     }
     catch (Exception ex)
     {
         ScriptManager.RegisterStartupScript(this, typeof(Page), "alert", "alert('Due to some technical issue record not found');", true);
     }
 }