/// <summary> /// Function for Delete /// </summary> public void DeleteFunction() { try { MonthlySalaryVoucherBll BllMonthlySalaryDetails = new MonthlySalaryVoucherBll(); MonthlySalaryVoucherBll BllMonthlySalary = new MonthlySalaryVoucherBll(); string strMonth = dtpSalaryMonth.Text; BllMonthlySalary.MonthlySalaryDeleteAll(BllMonthlySalary.MonthlySalarySettingsMonthlySalaryIdSearchUsingSalaryMonth(Convert.ToDateTime(dtpSalaryMonth.Text))); Messages.DeletedMessage(); SalaryPackageComboFill(); GridFill(); UpdateDataGridViewRowColors(); DeleteButtonEnableDisableChoose(); dtpSalaryMonth.Focus(); } catch (Exception ex) { MessageBox.Show("MSS5" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }