📄 from_list.cs
字号:
using System;
using System.Collections.Generic;
using System.Text;
using Sybase.DataWindow;
using SPRFrame;
using HPIResource;
namespace HPIResource.HisForm
{
// 申请单表
public class Form_List : Sybase.DataWindow.DataStore
{
string strSql = "";
public Form_List()
{
this.LibraryList = HPIR.PbdFile;
this.DataWindowObject = "dw_form_list";
this.SetTransaction(SPRF.GetDB());
strSql = this.GetSqlSelect();
}
public void ResetSQL()
{
this.SetSqlSelect(strSql);
}
#region 属性
// 申请单编号
public int ID
{
get
{
if (this.RowCount == 0) return -1;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "id"));
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "id", value);
}
}
// 申请单类型
public string TYPE
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "FormType");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "FormType", value);
}
}
// 是否为模版(0 - 模版,1 - 普通申请单)
public string MODEL_STS
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "model_sts");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "model_sts", value);
}
}
// 如果是普通申请单,该字段表示使用的模版编号
public int MODEL_ID
{
get
{
if (this.RowCount == 0) return -1;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "model_id"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "model_id", value);
}
}
// 摘要
public string CAPTION
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "caption");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "caption", value);
}
}
// 申请单的来源(M - 门诊,Z - 住院,J - 急诊)
public string SOURCE
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "source");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "source", value);
}
}
//------------------------------------------------------------------
// 病人编号
public string PatientID
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "patirnt_id");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "patient_id", value);
}
}
// 床位
public int BedID
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "bedid"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "bedid", value);
}
}
// 床位所在病区
public int BedDept
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "beddept"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "beddept", value);
}
}
//------------------------------------------------------------------
// 结算标志 T - 结算 F - 未结算
public string STS_JS
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "sts_js");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "sts_js", value);
}
}
// 执行标志 T - 执行 F - 未执行
public string STS_ZX
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "sts_zx");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "sts_zx", value);
}
}
// 作废标志 T - 作废 F - 未作废
public string STS_ZF
{
get
{
if (this.RowCount == 0) return "NoData";
return this.GetItemString(this.CurrentRow, "sts_zf");
}
set
{
if (this.RowCount == 0) return;
this.SetItemString(this.CurrentRow, "sts_zf", value);
}
}
// 结算编号
public int AccID
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "acc_id"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "acc_id", value);
}
}
//------------------------------------------------------------------
// 开单人
public int KDMan
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow,"kdman"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow,"kdman",value);
}
}
// 开单部门
public int KDDept
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "kddept"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "kddept", value);
}
}
// 开单日期
public int KDDate
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "kddate"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "kddate", value);
}
}
// 开单时间
public int KDTime
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "kdtime"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "kdtime", value);
}
}
//------------------------------------------------------------------
// 执行人
public int ZXMan
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "zxman"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zxman", value);
}
}
// 执行部门
public int ZXDept
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "zxdept"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zxdept", value);
}
}
// 执行日期
public int ZXDate
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "zxdate"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zxdate", value);
}
}
// 执行时间
public int ZXTime
{
get
{
if (this.RowCount == 0) return 0;
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "zxtime"));
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "zxtime", value);
}
}
// 申请单最后的版本号
public int Version
{
get
{
if (this.RowCount == 0) return 0;
try
{
return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "LastVersion"));
}
catch
{
return 0;
}
}
set
{
if (this.RowCount == 0) return;
this.SetItemDouble(this.CurrentRow, "LastVersion", value);
}
}
#endregion
#region 取数据的方法
public void SetDataById(int iId)
{
string SqlString = this.GetSqlSelect();
SqlString += "where id = " + iId.ToString();
this.SetSqlSelect(SqlString);
}
public void SetDataAsModel()
{
string SqlString = this.GetSqlSelect();
SqlString += "where Model_Sts = '0'";
this.SetSqlSelect(SqlString);
}
public void SetDataAsModel(string sModelType)
{
string SqlString = this.GetSqlSelect();
SqlString += "where Model_Sts = '0' and formtype = '"+sModelType+"'";
this.SetSqlSelect(SqlString);
}
public void SetDataAsNormal()
{
string SqlString = this.GetSqlSelect();
SqlString += "where Model_Sts = '1'";
this.SetSqlSelect(SqlString);
}
#endregion
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -