📄 casherjzrecord.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;
using SPRFrame;
using System.Windows.Forms;
namespace HPIResource.ShouFei
{
public class CasherJZRecord:DataStore
{
string strSQl = "";
public CasherJZRecord()
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_casherjzrecord_list";
this.SetTransaction(SPRF.GetDB());
strSQl = this.GetSqlSelect();
}
public CasherJZRecord(string sType)
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_casherjzrecord_"+sType;
this.SetTransaction(SPRF.GetDB());
strSQl = this.GetSqlSelect();
}
public void ResetSQL()
{
this.SetSqlSelect(strSQl);
}
#region 属性
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);
}
}
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);
}
}
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);
}
}
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);
}
}
public int SR_Bishu
{// 收入笔数
get
{
if (this.RowCount == 0) return -1;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "sr_bishu"));
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "sr_bishu", value);
}
}
public double SR_Jine
{// 收入金额
get
{
if (this.RowCount == 0) return -1;
try
{
return this.GetItemDouble(this.CurrentRow, "SR_Jine");
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "SR_Jine", value);
}
}
public double ZC_Jine
{// 支出金额
get
{
if (this.RowCount == 0) return -1;
try
{
return this.GetItemDouble(this.CurrentRow, "zc_jine");
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zc_jine", value);
}
}
public double ZJE
{// 合计
get
{
return SR_Jine - ZC_Jine;
}
}
public int ZC_Bishu
{// 支出笔数
get
{
if (this.RowCount == 0) return -1;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "zc_bishu"));
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zc_bishu", value);
}
}
#endregion
#region 取数据的方法
public void SetDataById(int ID)
{
this.ResetSQL();
string s = this.GetSqlSelect();
int i = s.IndexOf("WHERE");
if (i > 0)
{
string s1 = s.Substring(0, i + 5);
string s2 = s.Substring(i + 6, s.Length - i - 6);
s = s1 + " ( id = " + ID.ToString() + " ) and " + s2;
}
else
{
s += " where id = " + ID.ToString();
}
this.SetSqlSelect(s);
}
public void SetDataByUser(int iUser)
{
this.ResetSQL();
string s = this.GetSqlSelect();
int i = s.IndexOf("WHERE");
if (i > 0)
{
string s1 = s.Substring(0, i + 5);
string s2 = s.Substring(i + 6, s.Length - i - 6);
s = s1 + " ( ActMan = " + iUser.ToString() + " ) and " + s2 + " order by ID";
}
this.SetSqlSelect(s);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -