/// <summary>
 /// Function to fill Datagridview
 /// </summary>
 /// <param name="isEditmode"></param>
 public void DailySalaryVoucherDetailsGridfill(bool @isEditmode)
 {
     try
     {
         DataTable dtbl = new DataTable();
         DailySalaryVoucherDetailsSP spDetails = new DailySalaryVoucherDetailsSP();
         dtbl = spDetails.DailySalaryVoucherDetailsGridViewAll(dtpSalaryDate.Value.ToString(), isEditmode, strVoucherNoforEdit);
         dgvDailySalaryVoucher.DataSource = dtbl;
     }
     catch (Exception ex)
     {
         MessageBox.Show("DSV2:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        /// <summary>
        /// Date vakidation and fills Datagridview
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void txtSalaryDate_Leave(object sender, EventArgs e)
        {
            try
            {
                DateValidation obj = new DateValidation();
                obj.DateValidationFunction(txtSalaryDate);
                if (txtSalaryDate.Text == string.Empty)
                {
                    txtSalaryDate.Text = PublicVariables._dtCurrentDate.ToString("dd-MMM-yyyy");
                }
                //---for change date in Date time picker----//
                string strdate = txtSalaryDate.Text;
                dtpSalaryDate.Value = Convert.ToDateTime(strdate.ToString());

                DataTable dtbl = new DataTable();
                DailySalaryVoucherDetailsSP spDetails = new DailySalaryVoucherDetailsSP();
                dtbl = spDetails.DailySalaryVoucherDetailsGridViewAll(txtSalaryDate.Text.ToString(), isEditmode, strVoucherNoforEdit);
                dgvDailySalaryVoucher.DataSource = dtbl;
            }
            catch (Exception ex)
            {
                MessageBox.Show("DSV30:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }