Пример #1
0
 /// <summary>
 /// Function to fill Datagridview
 /// </summary>
 public void GridFill()
 {
     try
     {
         DataTable                dtblMonthlySalaryDetails     = new DataTable();
         MonthlySalarySP          spMonthlySalary              = new MonthlySalarySP();
         MonthlySalaryInfo        infoMonthlySalary            = new MonthlySalaryInfo();
         MonthlySalaryDetailsSP   spMonthlySalaryDetails       = new MonthlySalaryDetailsSP();
         MonthlySalaryDetailsInfo infoMonthlySalaryDetailsInfo = new MonthlySalaryDetailsInfo();
         dtblMonthlySalaryDetails           = spMonthlySalary.MonthlySalarySettingsEmployeeViewAll(Convert.ToDateTime(dtpSalaryMonth.Text));
         dgvMonthySalarySettings.DataSource = dtblMonthlySalaryDetails;
         int    inRowCount   = dgvMonthySalarySettings.RowCount;
         string strNarration = string.Empty;
         for (int i = 0; i < inRowCount; i++)
         {
             if (dgvMonthySalarySettings.Rows[i].Cells["dgvtxtnarration"].Value.ToString() != string.Empty)
             {
                 strNarration = dgvMonthySalarySettings.Rows[i].Cells["dgvtxtnarration"].Value.ToString();
             }
         }
         for (int i = 0; i < inRowCount; i++)
         {
             //select default package for employee
             if (dgvMonthySalarySettings.Rows[i].Cells["dgvtxtdefaultPackageId"].Value != null && dgvMonthySalarySettings.Rows[i].Cells["dgvtxtdefaultPackageId"].Value.ToString() != "")
             {
                 dgvMonthySalarySettings.Rows[i].Cells["dgvcmbPackage"].Value = dgvMonthySalarySettings.Rows[i].Cells["dgvtxtdefaultPackageId"].Value;
             }
         }
         txtNarration.Text = strNarration;
     }
     catch (Exception ex)
     {
         MessageBox.Show("MSS4" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
     }
 }
        public List <DataTable> MonthlySalarySettingsEmployeeViewAll(DateTime dtSalaryMonth)
        {
            List <DataTable> listObj = new List <DataTable>();

            try
            {
                SPMonthlySalary.MonthlySalarySettingsEmployeeViewAll(dtSalaryMonth);
            }
            catch (Exception ex)
            {
                MessageBox.Show("MS1:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
            return(listObj);
        }
Пример #3
0
        private DataTable GetMonthlySalarySettingsFromDB(string date)
        {
            DataTable dtblMonthlySalaryDetails = new DataTable();

            try
            {
                MonthlySalarySP          spMonthlySalary              = new MonthlySalarySP();
                MonthlySalaryInfo        infoMonthlySalary            = new MonthlySalaryInfo();
                MonthlySalaryDetailsSP   spMonthlySalaryDetails       = new MonthlySalaryDetailsSP();
                MonthlySalaryDetailsInfo infoMonthlySalaryDetailsInfo = new MonthlySalaryDetailsInfo();
                dtblMonthlySalaryDetails = spMonthlySalary.MonthlySalarySettingsEmployeeViewAll(Convert.ToDateTime(date));
            }
            catch (Exception ex)
            {
            }
            return(dtblMonthlySalaryDetails);
        }