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

📄 registertype.cs

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

namespace HPIResource.Register
{
    public class RegisterType:DataStore
    {
        // 诊别
        string strSQl = "";
        public RegisterType()
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_RegisterType_Act";
            this.SetTransaction(SPRF.GetDB());
            strSQl = this.GetSqlSelect();
        }
        public RegisterType(string sType)
        {
            this.LibraryList = HPIR.PbdFile;
            this.DataWindowObject = "dw_RegisterType";
            this.SetTransaction(SPRF.GetDB());
            strSQl = this.GetSqlSelect();
        }
        public void ResetSQL()
        {
            this.SetSqlSelect(strSQl);
        }

        #region 属性
        public string ID
        {
            // 编号
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "regtype_id");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "regtype_id", value);
            }
        }
        public string Caption
        {
            // 简称
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "regcaption");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "regcaption", value);
            }
        }
        public string Name
        {
            // 名称
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "regtype_name");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "regtype_name", value);
            }
        }
        public int PriceID
        {
            // 收费编号
            get
            {
                if (this.RowCount == 0) return -1;
                try
                {
                    return Convert.ToInt32(this.GetItemDouble(this.CurrentRow, "reg_priceid"));
                }
                catch
                {
                    return 0;
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemDouble(this.CurrentRow, "reg_priceid", value);
            }
        }
        public string STS
        {
            // 状态
            get
            {
                if (this.RowCount == 0) return "NoData";
                try
                {
                    return this.GetItemString(this.CurrentRow, "sts");
                }
                catch
                {
                    return "";
                }
            }
            set
            {
                if (this.RowCount == 0) return;
                this.SetItemString(this.CurrentRow, "sts", value);
            }
        }
        #endregion

        #region 方法
        public void SetDataByID(string sID)
        {
            this.ResetSQL();
            string s = this.GetSqlSelect();
            s += "where regtype_id = '" + sID + "'";
            this.SetSqlSelect(s);
        }
        #endregion
    }
}

⌨️ 快捷键说明

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