⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 formaccount.cs

📁 .net 开发的基础框架
💻 CS
字号:
using System;
using System.Collections.Generic;
using System.Text;

using Sybase.DataWindow;

using SPRFrame;
using HPIResource;

namespace HPIResource.HisForm
{
    // 申请单结算记录
    public class FormAccount : Sybase.DataWindow.DataStore
    {
        string strSql = "";

        public FormAccount()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_form_account";
            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 int FORM_ID
        {
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "form_id"));
                }
                catch
                {
                    return 0;
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "form_id", value);
            }
        }
        // 结算日期
        public int AccDate
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "accDate"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "accDate", value);
            }
        }
        // 结算时间
        public int AccTime
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "accTime"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "accTime", value);
            }
        }
        // 结算人
        public int AccMan
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "accMan"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "accMan", value);
            }
        }
        // 结算部门
        public int AccDept
        {
            get
            {
                if (this.RowCount == 0) return -1;
                return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "accDept"));
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "accDept", value);
            }
        }
        // 结算方向:[+]正向结算 [-]反向结算
        public string AccDIR
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                return this.GetItemString(this.CurrentRow, "AccDir");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "AccDir", value);
            }
        }
        // 结算方式 A - 欠款,C - 现金
        public string AccType
        {
            get
            {
                if (this.RowCount == 0) return "NoData";
                return this.GetItemString(this.CurrentRow, "accType");
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "accType", value);
            }
        }

        #endregion

        #region 取数据的方法
        public void SetDataById(int iId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where id = " + iId.ToString();
            this.SetSqlSelect(SqlString);
        }
        public void SetDataByFormId(int iId)
        {
            string SqlString = this.GetSqlSelect();
            SqlString += "where form_id = " + iId.ToString();
            this.SetSqlSelect(SqlString);
        }
        #endregion
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -