?? casherinvoice.cs
字號:
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;
using SPRFrame;
namespace HPIResource.ShouFei
{
// 收款員發票
public class CasherInvoice : DataStore
{
string strSQl = "";
public CasherInvoice()
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_casherinvoice";
this.SetTransaction(SPRF.GetDB());
strSQl = this.GetSqlSelect();
}
public void ResetSQL()
{
this.SetSqlSelect(strSQl);
}
#region 屬性
public int CasherID
{// 收款員編號
get
{
if (this.RowCount == 0) return -1;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "ActMan"));
}
catch
{
return -1;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "ActMan", value);
}
}
public int XH
{// 領用序號
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "xh"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "xh", value);
}
}
public string InvType
{// 發票類型
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "InvType");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "InvType", value);
}
}
public int CurrentN0
{// 發票號碼
get
{
if (this.RowCount == 0) return -1;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "CurrentInvoiceNo"));
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "CurrentInvoiceNo", value);
}
}
#endregion
#region 取數據的方法
public void SetDataById(int ID)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where ActMan = " + ID.ToString();
this.SetSqlSelect(SqlString);
}
public void SetDataByCurrent(int ID,string invType)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where ActMan = " + ID.ToString() + " and xh = 0 and invType = '"+invType.ToUpper()+"'";
this.SetSqlSelect(SqlString);
}
#endregion
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -