public static bool Update(ContentAudioDto content)
        {
            string        sql = " UPDATE tblContentAudio SET ChapterID=@ChapterID,Content=@Content,Remarks=@Remarks,CreatedDate=@CreatedDate,CreatedBy=@CreatedBy,ModifyDate=@ModifyDate,ModifyedBy=@ModifyedBy,BookID=@BookID  WHERE ContentID=@ContentID";
            SqlConnection con = new SqlConnection(Properties.Settings.Default.BlindEyeDBConStr);
            SqlCommand    cmd = new SqlCommand(sql, con);

            cmd.Parameters.AddWithValue("@ChapterID", content.ChapterID);
            cmd.Parameters.AddWithValue("@Remarks", content.Remarks);
            cmd.Parameters.AddWithValue("@BookId", content.BookID);
            cmd.Parameters.AddWithValue("@CreatedDate", content.CreatedDate);
            cmd.Parameters.AddWithValue("@CreatedBy", content.CreatedBy);
            cmd.Parameters.AddWithValue("@ModifyDate", content.ModifyDate);
            cmd.Parameters.AddWithValue("@ModifyedBy", content.ModifyedBy);
            cmd.Parameters.AddWithValue("@Content", content.Content);

            try
            {
                con.Open();
                cmd.ExecuteNonQuery();
                return(true);
            }
            catch (Exception ex)
            {
                Constant.DBErrorMsg = ex.Message;

                return(false);
            }

            finally
            {
                con.Close();
            }
        }
        private void btnSave_Click(object sender, EventArgs e)
        {
            ContentTextDto ctext = new ContentTextDto();

            ctext.BookID      = Convert.ToInt64(cmbBook.SelectedValue.ToString());
            ctext.ChapterID   = Convert.ToInt64(cmbChapter.SelectedValue.ToString());
            ctext.Content     = rtxtContent.Text;
            ctext.CreatedBy   = MDIParent._UserMasterID;
            ctext.CreatedDate = DateTime.Now;
            ctext.ModifyedBy  = MDIParent._UserMasterID;
            ctext.ModifyDate  = DateTime.Now;
            ctext.Remarks     = rtxtRemarksForText.Text;

            if (ContentTextDao.Insert(ctext))
            {
                MessageBox.Show(Constant.NOTIFICATION_SUCCESS_DATA_SAVING, Constant.NOTIFICATION_CAPTION_SAVE, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                // ini();
            }
            else
            {
                MessageBox.Show(Constant.DBErrorMsg, Constant.NOTIFICATION_ERROR_DATA_SAVING, MessageBoxButtons.OK, MessageBoxIcon.Error);
            }



            //under cn

            if (txtBrowesAudio.Text.Trim() != string.Empty)
            {
                ContentAudioDto caudio = new ContentAudioDto();
                caudio.BookID      = Convert.ToInt64(cmbBook.SelectedValue.ToString());
                caudio.ChapterID   = Convert.ToInt64(cmbChapter.SelectedValue.ToString());
                caudio.Content     = buffAudioData;
                caudio.CreatedBy   = MDIParent._UserMasterID;
                caudio.CreatedDate = DateTime.Now;
                caudio.ModifyedBy  = MDIParent._UserMasterID;
                caudio.ModifyDate  = DateTime.Now;
                ctext.Remarks      = rtxtRemarksForAudio.Text;
                if (ContentAudioDao.Insert(caudio))
                {
                    MessageBox.Show(Constant.NOTIFICATION_SUCCESS_DATA_SAVING, Constant.NOTIFICATION_CAPTION_SAVE, MessageBoxButtons.OK, MessageBoxIcon.Asterisk);
                    ini();
                }
                else
                {
                    MessageBox.Show(Constant.DBErrorMsg, Constant.NOTIFICATION_ERROR_DATA_SAVING, MessageBoxButtons.OK, MessageBoxIcon.Error);
                }
            }
            rtxtContent.Text         = string.Empty;
            cmbBook.SelectedIndex    = 0;
            cmbChapter.SelectedIndex = 0;
            tbcUpload.SelectedIndex  = 0;
        }