yangle
21 小时以前 9643928dccb5656708d0c7d5567e4185abf54928
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
 
namespace BLL
{
    public class ClsIF_Source_View
    {
        /// <summary>
        /// 根据过滤条件返回生产资源列表
        /// </summary>
        /// <param name="sWhere">过滤条件</param>
        /// <param name="sErr">错误信息</param>
        /// <returns></returns>
        public DataSet GetList(string sWhere, ref string sErr)
        {
            try
            {
                DAL.ClsIF_Source_View dal = new DAL.ClsIF_Source_View();
                return dal.GetList(sWhere);
            }
            catch (Exception e)
            {
                sErr = sErr + "," + e.Message;
                return null;
            }
        }
 
        /// <summary>
        /// 根据代码返回生产资源信息
        /// </summary>
        /// <param name="sWhere">代码</param>
        /// <param name="sErr">错误信息</param>
        /// <returns></returns>
        public Model.ClsGy_Source_Model GetInfoByNumber(string sWhere, ref string sErr)
        {
            try
            {
                DAL.ClsIF_Source_View dal = new DAL.ClsIF_Source_View();
                if (dal.GetInfoByNumber(sWhere))
                {
                    return dal.omodel;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception e)
            {
                sErr = sErr + "," + e.Message;
                return null;
            }
        }
 
        /// <summary>
        /// 根据名称返回生产资源信息
        /// </summary>
        /// <param name="sWhere">名称</param>
        /// <param name="sErr">错误信息</param>
        /// <returns></returns>
        public Model.ClsGy_Source_Model GetInfoByName(string sWhere, ref string sErr)
        {
            try
            {
                DAL.ClsIF_Source_View dal = new DAL.ClsIF_Source_View();
                if (dal.GetInfoByName(sWhere))
                {
                    return dal.omodel;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception e)
            {
                sErr = sErr + "," + e.Message;
                return null;
            }
        }
 
        /// <summary>
        /// 根据内码返回生产资源信息
        /// </summary>
        /// <param name="sWhere">内码</param>
        /// <param name="sErr">错误信息</param>
        /// <returns></returns>
        public Model.ClsGy_Source_Model GetInfoByID(long sWhere, ref string sErr)
        {
            try
            {
                DAL.ClsIF_Source_View dal = new DAL.ClsIF_Source_View();
                if (dal.GetInfoByID(sWhere))
                {
                    return dal.omodel;
                }
                else
                {
                    return null;
                }
            }
            catch (Exception e)
            {
                sErr = sErr + "," + e.Message;
                return null;
            }
        }
 
    }
}