757 lines
26 KiB
C#
757 lines
26 KiB
C#
//
|
|
// 這個檔案是 勞務費 資料表的資料存取類別 檔案一
|
|
// 請不要修改這個檔案,重新產生資料存取類別時,這個檔案會被覆蓋掉
|
|
//
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.ComponentModel;
|
|
using System.Data;
|
|
using System.Data.Common;
|
|
using System.Linq;
|
|
using System.Transactions;
|
|
using WebLib;
|
|
using System.Data.SqlClient;
|
|
|
|
namespace Education
|
|
{
|
|
///<summary>
|
|
/// 勞務費 資料存取類別
|
|
///</ summary>
|
|
[DataObject]
|
|
public partial class DAC_勞務費 : WebLib.DAC
|
|
{
|
|
private const string _tableName = "[勞務費]";
|
|
private const string _allFields = "[編號], [領據編號], [費用別], [單價], [數量], [單位], [扣繳類別], [合計金額], [應扣繳稅額], [服務費], [作廢], [DB_APPNO], [DB_CRDAT], [DB_CRUSR], [DB_TRDAT], [DB_TRUSR]";
|
|
private string _orderBy = "[領據編號]";
|
|
private string _select = "select " + _allFields;
|
|
private string _insert = "[編號], [領據編號], [費用別], [單價], [數量], [單位], [扣繳類別], [合計金額], [應扣繳稅額], [服務費], [作廢], [DB_APPNO], [DB_CRDAT], [DB_CRUSR], [DB_TRDAT], [DB_TRUSR]";
|
|
private string _insertBak = "[編號], [領據編號], [費用別], [單價], [數量], [單位], [扣繳類別], [合計金額], [應扣繳稅額], [服務費], [作廢], [DB_APPNO], [DB_CRDAT], [DB_CRUSR], [DB_TRDAT], [DB_TRUSR], [DB_TRMOD]";
|
|
private string _insertValue = "@編號, @領據編號, @費用別, @單價, @數量, @單位, @扣繳類別, @合計金額, @應扣繳稅額, @服務費, @作廢, @DB_APPNO, @DB_CRDAT, @DB_CRUSR, @DB_TRDAT, @DB_TRUSR";
|
|
private string _insertBakValue = "@編號, @領據編號, @費用別, @單價, @數量, @單位, @扣繳類別, @合計金額, @應扣繳稅額, @服務費, @作廢, @DB_APPNO, @DB_CRDAT, @DB_CRUSR, @DB_TRDAT, @DB_TRUSR, @DB_TRMOD";
|
|
private string _from = " from " + _tableName + " ";
|
|
private string _where = " where 1=1 ";
|
|
private string _order = " order by [領據編號] ";
|
|
|
|
public DAC_勞務費()
|
|
: base()
|
|
{
|
|
}
|
|
|
|
public DAC_勞務費(DbConnection conn)
|
|
: base(conn)
|
|
{
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public 勞務費List SelectAll(string orderBy = "")
|
|
{
|
|
勞務費List result = new 勞務費List();
|
|
IDataList list = result as IDataList;
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = _select + _from + _where + (orderBy == null || orderBy.Length == 0 ? _order : " order by " + orderBy);
|
|
Select(cmdSelect, ref list);
|
|
return result;
|
|
}
|
|
|
|
public int SelectAllCount()
|
|
{
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = "select count(1) " + _from;
|
|
int i;
|
|
ExecuteScalar(cmdSelect, out i);
|
|
return i;
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public 勞務費List SelectAllPage(int startRowIndex, int maximumRows, string orderBy = "")
|
|
{
|
|
勞務費List result = new 勞務費List();
|
|
IDataList list = result as IDataList;
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText =
|
|
String.Format("select top {0} * from (", maximumRows)
|
|
+ "select " + _allFields
|
|
+ ", row_number() over (order by " + (orderBy == null || orderBy.Length == 0 ? _orderBy : orderBy) + ") as rowid "
|
|
+ _from + _where
|
|
+ ") as TMP1 where rowid > @startRowIndex ";
|
|
AddParam(cmdSelect, "startRowIndex", startRowIndex);
|
|
Select(cmdSelect, ref list);
|
|
return result;
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public 勞務費List SelectOne(int 領據編號)
|
|
{
|
|
勞務費List result = new 勞務費List();
|
|
IDataList list = result as IDataList;
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = _select + _from + _where
|
|
+ " and 領據編號 = @領據編號 "
|
|
;
|
|
AddParam(cmdSelect, "領據編號", 領據編號);
|
|
Select(cmdSelect, ref list);
|
|
return result;
|
|
}
|
|
|
|
///<summary>
|
|
/// 給查詢畫面用的增加 Where 條件的方法
|
|
///</summary>
|
|
private void AddWhere(DbCommand cmdSelect, ref bool noInput, int? 領據編號)
|
|
{
|
|
if (領據編號 != null)
|
|
{
|
|
noInput = false;
|
|
cmdSelect.CommandText += " and 領據編號 = @領據編號 ";
|
|
AddParam(cmdSelect, "領據編號", 領據編號);
|
|
}
|
|
|
|
}
|
|
|
|
///<summary>
|
|
/// 給查詢畫面用的 Select 方法
|
|
///</summary>
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public 勞務費List Select(bool noInputReturnAll, int? 領據編號, string orderBy = "")
|
|
{
|
|
勞務費List result = new 勞務費List();
|
|
bool noInput = true;
|
|
IDataList list = result as IDataList;
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = _select + _from + _where;
|
|
AddWhere(cmdSelect, ref noInput, 領據編號);
|
|
cmdSelect.CommandText += (orderBy == null || orderBy.Length == 0 ? _order : " order by " + orderBy);
|
|
|
|
if (!noInputReturnAll && noInput)
|
|
return result;
|
|
|
|
Select(cmdSelect, ref list);
|
|
return result;
|
|
}
|
|
|
|
///<summary>
|
|
/// 給查詢畫面用的 SelectCount 方法
|
|
///</summary>
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public int SelectCount(bool noInputReturnAll, int? 領據編號, string orderBy = "")
|
|
{
|
|
bool noInput = true;
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = "select count(1) " + _from + _where;
|
|
AddWhere(cmdSelect, ref noInput, 領據編號);
|
|
|
|
if (!noInputReturnAll && noInput)
|
|
return 0;
|
|
|
|
int i;
|
|
ExecuteScalar(cmdSelect, out i);
|
|
return i;
|
|
}
|
|
|
|
///<summary>
|
|
/// 給查詢畫面用的 SelectPage 方法
|
|
///</summary>
|
|
[DataObjectMethod(DataObjectMethodType.Select)]
|
|
public 勞務費List SelectPage(bool noInputReturnAll, int startRowIndex, int maximumRows, int? 領據編號, string orderBy = "")
|
|
{
|
|
勞務費List result = new 勞務費List();
|
|
bool noInput = true;
|
|
IDataList list = result as IDataList;
|
|
DbCommand cmdSelect = NewCommand();
|
|
|
|
cmdSelect.CommandText =
|
|
String.Format("select top {0} * from (", maximumRows)
|
|
+ "select " + _allFields
|
|
+ ", row_number() over (order by " + (orderBy == null || orderBy.Length == 0 ? _orderBy : orderBy) + ") as rowid "
|
|
+ _from + _where;
|
|
AddWhere(cmdSelect, ref noInput, 領據編號);
|
|
cmdSelect.CommandText += ") as TMP1 where rowid > @startRowIndex ";
|
|
AddParam(cmdSelect, "startRowIndex", startRowIndex);
|
|
|
|
if (!noInputReturnAll && noInput)
|
|
return result;
|
|
|
|
Select(cmdSelect, ref list);
|
|
return result;
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Insert)]
|
|
public 勞務費Item InsertOne(勞務費Item value)
|
|
{
|
|
using (TransactionScope ts = DAC.NewTransactionScope())
|
|
{
|
|
try
|
|
{
|
|
if (!BeforeInsertOne(value))
|
|
return value;
|
|
DbCommand cmdInsert = NewCommand();
|
|
cmdInsert.CommandText =
|
|
"insert into [勞務費]"
|
|
+ " (" + _insert + ")"
|
|
+ "values "
|
|
+ " (" + _insertValue + ");" ;
|
|
AddParam(cmdInsert, "編號", value.編號);
|
|
AddParam(cmdInsert, "領據編號", value.領據編號);
|
|
AddParam(cmdInsert, "費用別", value.費用別);
|
|
AddParam(cmdInsert, "單價", value.單價);
|
|
AddParam(cmdInsert, "數量", value.數量);
|
|
AddParam(cmdInsert, "單位", value.單位);
|
|
AddParam(cmdInsert, "扣繳類別", value.扣繳類別);
|
|
AddParam(cmdInsert, "合計金額", value.合計金額);
|
|
AddParam(cmdInsert, "應扣繳稅額", value.應扣繳稅額);
|
|
AddParam(cmdInsert, "服務費", value.服務費);
|
|
AddParam(cmdInsert, "作廢", value.作廢);
|
|
AddParam(cmdInsert, "DB_APPNO", 1);
|
|
AddParam(cmdInsert, "DB_CRDAT", DateTime.Now);
|
|
AddParam(cmdInsert, "DB_CRUSR", CurrentUserId);
|
|
AddParam(cmdInsert, "DB_TRDAT", DBNull.Value);
|
|
AddParam(cmdInsert, "DB_TRUSR", DBNull.Value);
|
|
ExecuteNonQuery(cmdInsert);
|
|
AfterInsertOne(value);
|
|
ts.Complete();
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
bool handled;
|
|
OnInsertOneError(error, out handled);
|
|
if(!handled)
|
|
throw error;
|
|
}
|
|
return value;
|
|
}
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Update)]
|
|
public 勞務費Item UpdateOne(勞務費Item value)
|
|
{
|
|
using (TransactionScope ts = DAC.NewTransactionScope())
|
|
{
|
|
try
|
|
{
|
|
if (!BeforeUpdateOne(value))
|
|
return value;
|
|
|
|
勞務費List oldValues = SelectOne(value.領據編號);
|
|
if (oldValues.Count == 0 || oldValues[0].DB_APPNO != value.DB_APPNO)
|
|
{
|
|
throw new DBConcurrencyException("在更新 \"勞務費\" 資料表時發生並行例外:找不到要更新的資料列");
|
|
}
|
|
else
|
|
{
|
|
DoBackup(oldValues[0], "UPDATE");
|
|
}
|
|
|
|
DbCommand cmdUpdate = NewCommand();
|
|
cmdUpdate.CommandText =
|
|
@"update [勞務費]
|
|
set
|
|
[編號] = @編號 ,
|
|
[費用別] = @費用別 ,
|
|
[單價] = @單價 ,
|
|
[數量] = @數量 ,
|
|
[單位] = @單位 ,
|
|
[扣繳類別] = @扣繳類別 ,
|
|
[合計金額] = @合計金額 ,
|
|
[應扣繳稅額] = @應扣繳稅額 ,
|
|
[服務費] = @服務費 ,
|
|
[作廢] = @作廢 ,
|
|
DB_APPNO = DB_APPNO + 1,
|
|
DB_TRDAT = @DB_TRDAT,
|
|
DB_TRUSR = @DB_TRUSR
|
|
where 1=1
|
|
and [領據編號] = @original_領據編號
|
|
and DB_APPNO = @original_DB_APPNO
|
|
";
|
|
AddParam(cmdUpdate, "編號", value.編號);
|
|
AddParam(cmdUpdate, "費用別", value.費用別);
|
|
AddParam(cmdUpdate, "單價", value.單價);
|
|
AddParam(cmdUpdate, "數量", value.數量);
|
|
AddParam(cmdUpdate, "單位", value.單位);
|
|
AddParam(cmdUpdate, "扣繳類別", value.扣繳類別);
|
|
AddParam(cmdUpdate, "合計金額", value.合計金額);
|
|
AddParam(cmdUpdate, "應扣繳稅額", value.應扣繳稅額);
|
|
AddParam(cmdUpdate, "服務費", value.服務費);
|
|
AddParam(cmdUpdate, "作廢", value.作廢);
|
|
AddParam(cmdUpdate, "DB_TRDAT", DateTime.Now);
|
|
AddParam(cmdUpdate, "DB_TRUSR", CurrentUserId);
|
|
AddParam(cmdUpdate, "original_領據編號", value.領據編號);
|
|
AddParam(cmdUpdate, "original_DB_APPNO", value.DB_APPNO);
|
|
ExecuteNonQuery(cmdUpdate);
|
|
AfterUpdateOne(value);
|
|
ts.Complete();
|
|
return value;
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
bool handled;
|
|
OnUpdateOneError(error, out handled);
|
|
if(!handled)
|
|
throw error;
|
|
return value;
|
|
}
|
|
}
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Update)]
|
|
public 勞務費Item UpdateOne(勞務費Item value, 勞務費Item original_value)
|
|
{
|
|
using (TransactionScope ts = DAC.NewTransactionScope())
|
|
{
|
|
try
|
|
{
|
|
if (!BeforeUpdateOne(value, original_value))
|
|
return value;
|
|
|
|
勞務費List oldValues = SelectOne(original_value.領據編號);
|
|
if (oldValues.Count == 0 || oldValues[0].DB_APPNO != value.DB_APPNO)
|
|
{
|
|
throw new DBConcurrencyException("在更新 \"勞務費\" 資料表時發生並行例外:找不到要更新的資料列");
|
|
}
|
|
else
|
|
{
|
|
DoBackup(oldValues[0], "UPDATE");
|
|
}
|
|
|
|
DbCommand cmdUpdate = NewCommand();
|
|
cmdUpdate.CommandText =
|
|
@"update [勞務費]
|
|
set
|
|
[編號] = @編號 ,
|
|
[領據編號] = @領據編號 ,
|
|
[費用別] = @費用別 ,
|
|
[單價] = @單價 ,
|
|
[數量] = @數量 ,
|
|
[單位] = @單位 ,
|
|
[扣繳類別] = @扣繳類別 ,
|
|
[合計金額] = @合計金額 ,
|
|
[應扣繳稅額] = @應扣繳稅額 ,
|
|
[服務費] = @服務費 ,
|
|
[作廢] = @作廢 ,
|
|
DB_APPNO = DB_APPNO + 1,
|
|
DB_TRDAT = @DB_TRDAT,
|
|
DB_TRUSR = @DB_TRUSR
|
|
where 1=1
|
|
and [領據編號] = @original_領據編號
|
|
and DB_APPNO = @original_DB_APPNO
|
|
";
|
|
AddParam(cmdUpdate, "編號", value.編號);
|
|
AddParam(cmdUpdate, "領據編號", value.領據編號);
|
|
AddParam(cmdUpdate, "費用別", value.費用別);
|
|
AddParam(cmdUpdate, "單價", value.單價);
|
|
AddParam(cmdUpdate, "數量", value.數量);
|
|
AddParam(cmdUpdate, "單位", value.單位);
|
|
AddParam(cmdUpdate, "扣繳類別", value.扣繳類別);
|
|
AddParam(cmdUpdate, "合計金額", value.合計金額);
|
|
AddParam(cmdUpdate, "應扣繳稅額", value.應扣繳稅額);
|
|
AddParam(cmdUpdate, "服務費", value.服務費);
|
|
AddParam(cmdUpdate, "作廢", value.作廢);
|
|
AddParam(cmdUpdate, "DB_TRDAT", DateTime.Now);
|
|
AddParam(cmdUpdate, "DB_TRUSR", CurrentUserId);
|
|
AddParam(cmdUpdate, "original_領據編號", original_value.領據編號);
|
|
AddParam(cmdUpdate, "original_DB_APPNO", original_value.DB_APPNO);
|
|
ExecuteNonQuery(cmdUpdate);
|
|
AfterUpdateOne(value, original_value);
|
|
ts.Complete();
|
|
return value;
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
bool handled;
|
|
OnUpdateOneError(error, out handled);
|
|
if(!handled)
|
|
throw error;
|
|
return value;
|
|
}
|
|
}
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Delete)]
|
|
public int DeleteOne(int 領據編號, int DB_APPNO)
|
|
{
|
|
using (TransactionScope ts = DAC.NewTransactionScope())
|
|
{
|
|
try
|
|
{
|
|
if (!BeforeDeleteOne(領據編號, DB_APPNO))
|
|
return -1;
|
|
|
|
勞務費List oldValues = SelectOne(領據編號);
|
|
if (oldValues.Count == 0 || oldValues[0].DB_APPNO != DB_APPNO)
|
|
{
|
|
throw new DBConcurrencyException("在刪除 \"勞務費\" 資料表時發生並行例外:找不到要刪除的資料列");
|
|
}
|
|
else
|
|
{
|
|
DoBackup(oldValues[0], "DELETE");
|
|
}
|
|
|
|
DbCommand cmdDelete = NewCommand();
|
|
cmdDelete.CommandText =
|
|
@"delete from [勞務費]
|
|
where 1=1
|
|
and 領據編號 = @領據編號
|
|
and DB_APPNO = @DB_APPNO
|
|
";
|
|
AddParam(cmdDelete, "領據編號", 領據編號);
|
|
AddParam(cmdDelete, "DB_APPNO", DB_APPNO);
|
|
int rowsAffected = ExecuteNonQuery(cmdDelete);
|
|
AfterDeleteOne(領據編號, DB_APPNO);
|
|
ts.Complete();
|
|
return rowsAffected;
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
bool handled;
|
|
OnDeleteOneError(error, out handled);
|
|
if(!handled)
|
|
throw error;
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
|
|
[DataObjectMethod(DataObjectMethodType.Delete)]
|
|
public int DeleteOne(勞務費Item value)
|
|
{
|
|
using (TransactionScope ts = DAC.NewTransactionScope())
|
|
{
|
|
try
|
|
{
|
|
if (!BeforeDeleteOne(value))
|
|
return -1;
|
|
|
|
勞務費List oldValues = SelectOne(value.領據編號);
|
|
if (oldValues.Count == 0 || oldValues[0].DB_APPNO != value.DB_APPNO)
|
|
{
|
|
throw new DBConcurrencyException("在刪除 \"勞務費\" 資料表時發生並行例外:找不到要刪除的資料列");
|
|
}
|
|
else
|
|
{
|
|
DoBackup(oldValues[0], "DELETE");
|
|
}
|
|
|
|
DbCommand cmdDelete = NewCommand();
|
|
cmdDelete.CommandText =
|
|
@"delete from [勞務費]
|
|
where 1=1
|
|
and 領據編號 = @領據編號
|
|
and DB_APPNO = @DB_APPNO
|
|
";
|
|
AddParam(cmdDelete, "領據編號", value.領據編號);
|
|
AddParam(cmdDelete, "DB_APPNO", value.DB_APPNO);
|
|
int rowsAffected = ExecuteNonQuery(cmdDelete);
|
|
AfterDeleteOne(value);
|
|
ts.Complete();
|
|
return rowsAffected;
|
|
}
|
|
catch (Exception error)
|
|
{
|
|
bool handled;
|
|
OnDeleteOneError(error, out handled);
|
|
if(!handled)
|
|
throw error;
|
|
return -1;
|
|
}
|
|
}
|
|
}
|
|
|
|
public bool IsDuplicate(int 領據編號)
|
|
{
|
|
DbCommand cmdSelect = NewCommand();
|
|
cmdSelect.CommandText = "select count(1)" + _from + _where
|
|
+ " and 領據編號 = @領據編號 "
|
|
;
|
|
AddParam(cmdSelect, "領據編號", 領據編號);
|
|
int count;
|
|
ExecuteScalar(cmdSelect, out count);
|
|
return count > 0;
|
|
}
|
|
|
|
public void DoBackup(勞務費Item value, string updateMode)
|
|
{
|
|
DbCommand cmdBak = NewCommand();
|
|
cmdBak.CommandText =
|
|
"insert into [勞務費_BAK]"
|
|
+ " (" + _insertBak + ")"
|
|
+ "values "
|
|
+ " (" + _insertBakValue + ");"
|
|
;
|
|
AddParam(cmdBak, "編號", value.編號);
|
|
AddParam(cmdBak, "領據編號", value.領據編號);
|
|
AddParam(cmdBak, "費用別", value.費用別);
|
|
AddParam(cmdBak, "單價", value.單價);
|
|
AddParam(cmdBak, "數量", value.數量);
|
|
AddParam(cmdBak, "單位", value.單位);
|
|
AddParam(cmdBak, "扣繳類別", value.扣繳類別);
|
|
AddParam(cmdBak, "合計金額", value.合計金額);
|
|
AddParam(cmdBak, "應扣繳稅額", value.應扣繳稅額);
|
|
AddParam(cmdBak, "服務費", value.服務費);
|
|
AddParam(cmdBak, "作廢", value.作廢);
|
|
AddParam(cmdBak, "DB_APPNO", value.DB_APPNO);
|
|
AddParam(cmdBak, "DB_CRDAT", value.DB_CRDAT);
|
|
AddParam(cmdBak, "DB_CRUSR", value.DB_CRUSR);
|
|
AddParam(cmdBak, "DB_TRDAT", DateTime.Now);
|
|
AddParam(cmdBak, "DB_TRUSR", CurrentUserId);
|
|
AddParam(cmdBak, "DB_TRMOD", updateMode);
|
|
ExecuteNonQuery(cmdBak);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
///<summary>
|
|
///勞務費 資料集合類別
|
|
///</summary>
|
|
[Serializable]
|
|
public partial class 勞務費List : List<勞務費Item>, IDataList
|
|
{
|
|
public void Fill(DbDataReader reader)
|
|
{
|
|
DAC.FillData<勞務費Item>(reader, this);
|
|
}
|
|
}
|
|
|
|
|
|
///<summary>
|
|
/// 勞務費 資料紀錄類別
|
|
///</summary>
|
|
[Serializable]
|
|
public partial class 勞務費Item : DataItemBase
|
|
{
|
|
private string _編號;
|
|
private int _領據編號;
|
|
private string _費用別;
|
|
private int? _單價;
|
|
private decimal? _數量;
|
|
private string _單位;
|
|
private string _扣繳類別;
|
|
private int? _合計金額;
|
|
private int? _應扣繳稅額;
|
|
private int? _服務費;
|
|
private int? _作廢;
|
|
|
|
#region 資料欄位
|
|
///<summary>
|
|
/// 編號
|
|
///</summary>
|
|
[DataObjectField(false, false, true, 10)]
|
|
public string 編號
|
|
{
|
|
get
|
|
{
|
|
return _編號;
|
|
}
|
|
set
|
|
{
|
|
if (value != _編號)
|
|
{
|
|
_編號 = value;
|
|
OnPropertyChanged("編號");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 領據編號
|
|
///</summary>
|
|
[DataObjectField(true, false, false)]
|
|
public int 領據編號
|
|
{
|
|
get
|
|
{
|
|
return _領據編號;
|
|
}
|
|
set
|
|
{
|
|
if (value != _領據編號)
|
|
{
|
|
_領據編號 = value;
|
|
OnPropertyChanged("領據編號");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 費用別
|
|
///</summary>
|
|
[DataObjectField(false, false, true, 20)]
|
|
public string 費用別
|
|
{
|
|
get
|
|
{
|
|
return _費用別;
|
|
}
|
|
set
|
|
{
|
|
if (value != _費用別)
|
|
{
|
|
_費用別 = value;
|
|
OnPropertyChanged("費用別");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 單價
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public int? 單價
|
|
{
|
|
get
|
|
{
|
|
return _單價;
|
|
}
|
|
set
|
|
{
|
|
if (value != _單價)
|
|
{
|
|
_單價 = value;
|
|
OnPropertyChanged("單價");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 數量
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public decimal? 數量
|
|
{
|
|
get
|
|
{
|
|
return _數量;
|
|
}
|
|
set
|
|
{
|
|
if (value != _數量)
|
|
{
|
|
_數量 = value;
|
|
OnPropertyChanged("數量");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 單位
|
|
///</summary>
|
|
[DataObjectField(false, false, true, 10)]
|
|
public string 單位
|
|
{
|
|
get
|
|
{
|
|
return _單位;
|
|
}
|
|
set
|
|
{
|
|
if (value != _單位)
|
|
{
|
|
_單位 = value;
|
|
OnPropertyChanged("單位");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 扣繳類別
|
|
///</summary>
|
|
[DataObjectField(false, false, true, 20)]
|
|
public string 扣繳類別
|
|
{
|
|
get
|
|
{
|
|
return _扣繳類別;
|
|
}
|
|
set
|
|
{
|
|
if (value != _扣繳類別)
|
|
{
|
|
_扣繳類別 = value;
|
|
OnPropertyChanged("扣繳類別");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 合計金額
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public int? 合計金額
|
|
{
|
|
get
|
|
{
|
|
return _合計金額;
|
|
}
|
|
set
|
|
{
|
|
if (value != _合計金額)
|
|
{
|
|
_合計金額 = value;
|
|
OnPropertyChanged("合計金額");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 應扣繳稅額
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public int? 應扣繳稅額
|
|
{
|
|
get
|
|
{
|
|
return _應扣繳稅額;
|
|
}
|
|
set
|
|
{
|
|
if (value != _應扣繳稅額)
|
|
{
|
|
_應扣繳稅額 = value;
|
|
OnPropertyChanged("應扣繳稅額");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 服務費
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public int? 服務費
|
|
{
|
|
get
|
|
{
|
|
return _服務費;
|
|
}
|
|
set
|
|
{
|
|
if (value != _服務費)
|
|
{
|
|
_服務費 = value;
|
|
OnPropertyChanged("服務費");
|
|
}
|
|
}
|
|
}
|
|
|
|
///<summary>
|
|
/// 作廢
|
|
///</summary>
|
|
[DataObjectField(false, false, true)]
|
|
public int? 作廢
|
|
{
|
|
get
|
|
{
|
|
return _作廢;
|
|
}
|
|
set
|
|
{
|
|
if (value != _作廢)
|
|
{
|
|
_作廢 = value;
|
|
OnPropertyChanged("作廢");
|
|
}
|
|
}
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|