Exemple #1
0

        
Exemple #2
0
 private void BindBookDetails()
 {
     try
     {
         DataTable dt     = new DataTable();
         int       status = 0;
         if (!string.IsNullOrEmpty(txtBookId.Text))
         {
             dt = objDb.FetchBookDetails(Convert.ToInt32(txtBookId.Text == string.Empty ? 0 : Convert.ToInt32(txtBookId.Text)),
                                         string.Empty, string.Empty, string.Empty, 0);
             if (dt != null && dt.Rows.Count > 0)
             {
                 txtBookName.Text      = dt.Rows[0]["Book_Name"].ToString();
                 txtpublisherName.Text = dt.Rows[0]["Publisher_Name"].ToString();
                 txtAuthorName.Text    = dt.Rows[0]["Author_Name"].ToString();
                 ddlcat.SelectedValue  = dt.Rows[0]["Category"].ToString();
                 status = Convert.ToInt16(dt.Rows[0]["Status"].ToString());
                 if (dt.Rows[0]["BOOK_IMGFILENAME"].ToString() != string.Empty)
                 {
                     Image1.ImageUrl = UploadFolderPath + dt.Rows[0]["BOOK_IMGFILENAME"].ToString();
                     // hdImg1.Value = dt.Rows[0]["BOOK_IMGFILENAME"].ToString();
                 }
                 else
                 {
                     Image1.ImageUrl = UploadFolderPath + "NoImage.png";
                     // hdImg1.Value = "";
                 }
                 setVisibility(status);
             }
         }
     }
     catch (Exception)
     {
         throw;
     }
 }