using System; using System.Collections.Generic; using System.Data.Common; using System.Linq; using System.Web; using WebLib; namespace Education { public class DAC_BRTE : DAC { public DAC_BRTE() { } public DAC_BRTE(DbConnection conn) : base(conn) { } private decimal GetValue(string brtyp) { DbCommand cmd = NewCommand(); cmd.CommandText = @"SELECT TOP 1 BRRTE FROM BRTE WHERE BRTYP=@BRTYP AND BRSDT <= @TODAY ORDER BY BRSDT DESC"; AddParam(cmd, "BRTYP", brtyp); AddParam(cmd, "TODAY", PublicVariable.TaiwanNow.Date); ExecuteScalar(cmd, out decimal value); return value; } public decimal 領據執行業務所得課稅門檻 { get { return GetValue("領據執行業務所得課稅門檻"); } } public decimal 領據薪資課稅門檻 { get { return GetValue("領據薪資課稅門檻"); } } public decimal 領據基本工資 { get { return GetValue("領據基本工資"); } } public decimal 領據執行業務所得稅率 { get { return GetValue("領據執行業務所得稅率"); } } public decimal 領據薪資稅率 { get { return GetValue("領據薪資稅率"); } } } }