private void m_cmd_continue_Click(object sender, EventArgs e)
{
try
{
lay_option();
switch(_option)
{
case option_tinh_tnk.CHUA_CHON:
XtraMessageBox.Show("Bạn chưa chọn cách tính thu nhập khác!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
case option_tinh_tnk.TONG_TIEN:
if(m_txt_tong_tien.EditValue == null)
{
XtraMessageBox.Show("Bạn chưa nhập tổng tiền!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if(m_txt_thue_tong_tien.EditValue == null)
{
XtraMessageBox.Show("Bạn chưa nhập thuế!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
is_nguoi_dung_an_tiep_tuc = true;
_so_tien = Convert.ToDecimal(m_txt_tong_tien.EditValue);
_phan_tram_thue = Convert.ToDecimal(m_txt_thue_tong_tien.EditValue);
break;
case option_tinh_tnk.DON_GIA:
if(m_txt_don_gia.EditValue == null)
{
XtraMessageBox.Show("Bạn chưa nhập đơn giá!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
if(m_txt_thue_don_gia.EditValue == null)
{
XtraMessageBox.Show("Bạn chưa nhập thuế!", "THÔNG BÁO", MessageBoxButtons.OK, MessageBoxIcon.Warning);
return;
}
is_nguoi_dung_an_tiep_tuc = true;
_so_tien = Convert.ToDecimal(m_txt_don_gia.EditValue);
_phan_tram_thue = Convert.ToDecimal(m_txt_thue_don_gia.EditValue);
break;
case option_tinh_tnk.KHONG_TINH:
break;
default:
break;
}
Close();
}
catch(Exception v_e)
{
CSystemLog_301.ExceptionHandle(v_e);
}
}