1
yangle
2023-03-31 efa48f2d4c44a11ca38a9ee3794c3c47d6acd282
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
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using SQLHelper;
using DBUtility;
 
namespace BLL
{
    class ClsXt_AccountPeriodHlp
    {
        private string mvarReportTitle;
 
        public string MvarReportTitle
        {
            get { return mvarReportTitle; }
            set { mvarReportTitle = value; }
        }
        public string WherePart;
        public string ClsName;
        //
        ClsCN oCN = new ClsCN();
        public int HYear;
        public int HPeriod;
        public string HBeginDate;
        public string HEndDate;
        public bool HEndFlag;
        // 
        //
        public ClsXt_AccountPeriodHlp()
        {
            mvarReportTitle = "会计期间设置";
            ClsName = "会计期间";
        }
        
        //返回项目信息
        public bool GetInfoByID(int sYear,int sPeriod)
        {
            DataSet DS ;
            try
            {
                DS = oCN.RunProcReturn("Select * from Xt_AccountPeriod Where HYear=" + sYear.ToString() + " and HPeriod=" +sPeriod.ToString(), "Xt_AccountPeriod");
                if (DS.Tables[0].Rows.Count  == 0)
                    return false;
                else
                {
                    HYear = ClsPub.isInt(DS.Tables[0].Rows[0]["HYear"]);
                    HPeriod = ClsPub.isInt(DS.Tables[0].Rows[0]["HPeriod"]);
                    HBeginDate = ClsPub.isDate(DS.Tables[0].Rows[0]["HBeginDate"]).ToShortDateString();
                    HEndDate = ClsPub.isDate(DS.Tables[0].Rows[0]["HEndDate"]).ToShortDateString();
                    HEndFlag = (bool)DS.Tables[0].Rows[0]["HEndFlag"];
                    return true;
                }
            }
            catch (Exception e)
            {
                return false;
            }
        }
    }
}