沈泽
2021-08-20 d111e4321dcc4baa63f63597694f80d94e67ca11
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
 
namespace BLL
{
    /// <summary>
    /// 单据编号规则表
    /// </summary>
    public class ClsGy_BillNumber_View:DBUtility.ClsGy_Base_View
    {
        
        //
        public ClsGy_BillNumber_Model omodel = new ClsGy_BillNumber_Model();
        SQLHelper.ClsCN oCn = new SQLHelper.ClsCN(); 
        public ClsGy_BillNumber_View()
        {
            base.MvarReportTitle = "单据编号规则表设置";
            base.MvarItemKey = "Gy_BillNumber";
        }
        //
        public void Dispose()
        {
            GC.SuppressFinalize(this);
        }
        //
         
        //返回项目信息
        public bool GetInfoByID(string sItemID)
        {
            DataSet DS ;
            try
            {
                DS = oCn.RunProcReturn("Select * from " + MvarItemKey + " Where BillCode='" + sItemID + "'", MvarItemKey, ref DBUtility.ClsPub.sExeReturnInfo);
                if (DS.Tables[0].Rows.Count  == 0)
                    return false;
                else
                {
                    return GetInfo(DS);
                }
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
 
        //返回项目信息
        public override bool GetInfo(DataSet Ds)
        {
            try
            {
                omodel = new ClsGy_BillNumber_Model();
                omodel.BillType = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillType"]);
                omodel.BillCode = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillCode"]);
                omodel.BillName = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["BillName"]);
                omodel.BillCodeMode = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["BillCodeMode"]);
                omodel.Profix = DBUtility.ClsPub.isStrNull(Ds.Tables[0].Rows[0]["Profix"]);
                omodel.CodeLen = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["CodeLen"]);
                omodel.TotalLen = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["TotalLen"]);
                omodel.Glida = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["Glida"]);
                omodel.IDNow = DBUtility.ClsPub.isLong(Ds.Tables[0].Rows[0]["IDNow"]);
                return true;
 
            }
            catch (Exception e)
            {
                throw (e);
            }
        }
    }
}