📄 cashrecord.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;
using SPRFrame;
namespace HPIResource.ShouFei
{
public class CashRecord:DataStore
{
string strSQl = "";
public CashRecord()
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_cashrecord_list";
this.SetTransaction(SPRF.GetDB());
strSQl = this.GetSqlSelect();
}
public CashRecord(string sType)
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_cashrecord_"+sType;
this.SetTransaction(SPRF.GetDB());
strSQl = this.GetSqlSelect();
}
public void ResetSQL()
{
this.SetSqlSelect(strSQl);
}
#region 属性
/// <summary>
/// 内部编号
/// </summary>
public int ID
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "id"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "id", value);
}
}
/// <summary>
/// M - 门诊 N - 门诊退款 L - 门诊预收 K - 退门诊预收 G - 挂号 T - 退号 Z - 住院 Y - 住院退款 X - 住院预收 W - 退住院预收
/// </summary>
public string ActType
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "ActType");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "ActType", value);
}
}
/// <summary>
/// 发生日期
/// </summary>
public int ActDate
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "ActDate"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "ActDate", value);
}
}
/// <summary>
/// 发生时间
/// </summary>
public int ActTime
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "ActTime"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "ActTime", value);
}
}
/// <summary>
/// 收款人
/// </summary>
public int ActMan
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "ActMan"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "ActMan", value);
}
}
/// <summary>
/// 付款人编号
/// </summary>
public string PayerID
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "PayerID");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "PayerID", value);
}
}
/// <summary>
/// 付款人姓名
/// </summary>
public string PayerName
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "PayerName");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "PayerName", value);
}
}
/// <summary>
/// 付款人帐号(或者保险编号)
/// </summary>
public string AccNo
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "AccNo");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "AccNo", value);
}
}
/// <summary>
/// 保险交易号
/// </summary>
public string TransNo
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "TransNo");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "TransNo", value);
}
}
/// <summary>
/// 内部发票号码
/// </summary>
public int InvoiceID
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "InvoiceID"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "InvoiceID", value);
}
}
/// <summary>
/// 结帐单编号
/// </summary>
public int JZ_ID
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "JZ_ID"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "JZ_ID", value);
}
}
/// <summary>
/// 应收金额
/// </summary>
public double SUM_YS
{
get
{
if (this.RowCount == 0) return -1;
return this.GetItemDouble(this.CurrentRow, "SUM_YS");
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "SUM_YS", value);
}
}
/// <summary>
/// 抹零金额
/// </summary>
public double SUM_ML
{
get
{
if (this.RowCount == 0) return -1;
return this.GetItemDouble(this.CurrentRow, "SUM_ML");
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "SUM_ML", value);
}
}
/// <summary>
/// 实收金额
/// </summary>
public double SUM_SL
{
get
{
if (this.RowCount == 0) return -1;
return this.GetItemDouble(this.CurrentRow, "SUM_SL");
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "SUM_SL", value);
}
}
/// <summary>
/// 记帐金额(保险等)
/// </summary>
public double SUM_JZ
{
get
{
if (this.RowCount == 0) return -1;
return this.GetItemDouble(this.CurrentRow, "SUM_JZ");
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "SUM_JZ", value);
}
}
/// <summary>
/// 内部结算编号
/// </summary>
public int AccID
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "AccID"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "AccID", value);
}
}
#endregion
#region 方法
public void SetDataById(int id)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where id = " + id.ToString();
this.SetSqlSelect(SqlString);
}
/// <summary>
/// 按照内部发票编号检索现金记录
/// </summary>
/// <param name="invID"></param>
public void SetDataByInvID(int invID)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where invoiceid = " + invID.ToString() + "order by id";
this.SetSqlSelect(SqlString);
}
/// <summary>
/// 按照结算编号检索现金记录
/// </summary>
/// <param name="id"></param>
public void SetDataByAccId(int id)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where accid = " + id.ToString() + "order by id";
this.SetSqlSelect(SqlString);
}
/// <summary>
/// 按照用户和结账编号检索现金记录
/// </summary>
/// <param name="iUser">用户编号</param>
/// <param name="iJzID">结账编号</param>
public void SetDataByUser_JzID(int iUser, int iJzID)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where jz_id = " +iJzID.ToString() + " and actman = " + iUser.ToString() + " order by id";
this.SetSqlSelect(SqlString);
}
/// <summary>
/// 按照用户和结账编号检索现金收入记录
/// </summary>
/// <param name="iUser">用户编号</param>
/// <param name="iJzID">结账编号</param>
public void SetDataByUser_JzID_In(int iUser, int iJzID)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where jz_id = " + iJzID.ToString() + " and actman = " + iUser.ToString() + " and ActType in('M','L','G') order by id";
this.SetSqlSelect(SqlString);
}
/// <summary>
/// 按照用户和结账编号检索现金支出记录
/// </summary>
/// <param name="iUser">用户编号</param>
/// <param name="iJzID">结账编号</param>
public void SetDataByUser_JzID_Out(int iUser, int iJzID)
{
this.ResetSQL();
string SqlString = this.GetSqlSelect();
SqlString += "where jz_id = " + iJzID.ToString() + " and actman = " + iUser.ToString() + " and ActType in('N','K','T') order by id";
this.SetSqlSelect(SqlString);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -