private void TaxSaveBTN_Click(object sender, EventArgs e) { if (RylMessageBox.ShowDialog("Are you sure you want to adjust the current Tax rates? Unsaved changes will be lost.", "Withholding Tax Rates", MessageBoxButtons.YesNo, MessageBoxIcon.Question) == DialogResult.Yes) { try { RatesSaver.CreateWithTaxQuery(TaxDateDTPKR.Value); foreach (DataGridViewRow row in TaxExemptionGRD.Rows) { var bracket = RatesSaver.CreateWithTaxBracket( double.Parse(row.Cells[1].Value.ToString().Split('+')[0].Trim(' ')), int.Parse(row.Cells[1].Value.ToString().Split('+')[1].Trim(' ').Split('%')[0])); for (var i = 2; i < TaxExemptionGRD.ColumnCount; i++) { RatesSaver.AddToWithTaxQuery(bracket, TaxExemptionGRD.Columns[i].HeaderText, double.Parse(row.Cells[i].Value.ToString())); } } RatesSaver.ExecuteWithTaxQuery(); TaxEditingMode(false); LoadTaxPage(); } catch (Exception ex) { ShowErrorBox("Withholding Tax", ex.Message); } } }
private void MultCancelPendingBTN_Click(object sender, EventArgs e) { if (RylMessageBox.ShowDialog("Are you sure you want to cancel the pending rates?", "Cancel Rates", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { RatesSaver.DeleteRate(((ComboBoxSss)MultipliersDateCMBX.SelectedItem).Id); LoadRatesMult(); } }
private void SSSCancelBTN_Click(object sender, EventArgs e) { if (RylMessageBox.ShowDialog("Are you sure you want to cancel the pending rates?", "Cancel Rates", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { RatesSaver.DeleteContrib(((ComboBoxSss)SSSDateCMBX.SelectedItem).Id); LoadSssPage(); } }
private void BasicPayCancelBTN_Click(object sender, EventArgs e) { if (RylMessageBox.ShowDialog("Are you sure you want to cancel the pending rates?", "Cancel Rates", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.Yes) { RatesSaver.DeleteBasicPay(int.Parse(BasicPayGRD.SelectedRows[0].Cells[0].Value.ToString())); LoadBasicPayPage(); } }