Esempio n. 1
0
        private List <StatisEntity> GetStatisList()
        {
            BLL.account bll       = new BLL.account();
            BLL.xiehui  xiehuiBll = new BLL.xiehui();

            var id   = xiehuiBll.GetId(txtTown.Text, txtVillage.Text);
            var ds   = bll.GetStatisList(this.keywords, Utils.StrToInt(id, 0), Utils.StrToInt(this.bSubject, 0), Utils.StrToInt(this.sSubject, 0)).Tables[0];
            var list = new List <StatisEntity>();

            foreach (DataRow item in ds.Rows)
            {
                BLL.subject_detail subjectDetailBll = new BLL.subject_detail();
                var subjcetDetail = subjectDetailBll.GetModel(Utils.StrToInt(item["b_subject"].ToString(), 0), Utils.StrToInt(item["s_subject"].ToString(), 0));
                if (subjcetDetail == null)
                {
                    continue;
                }
                var model  = new StatisEntity();
                var xiehui = xiehuiBll.GetModel(Utils.StrToInt(item["xiehui_id"].ToString(), 0));

                BLL.subject subjectBll   = new BLL.subject();
                var         bSubjectName = subjectBll.GetName(Utils.StrToInt(item["b_subject"].ToString(), 0));
                var         sSubjectName = subjectBll.GetName(Utils.StrToInt(item["s_subject"].ToString(), 0));

                model.Town      = xiehui.town;
                model.Village   = xiehui.village;
                model.XieHui    = xiehui.name;
                model.BBSubjcet = bSubjectName;
                model.SSbuject  = sSubjectName;
                model.Amount    = subjcetDetail.amount.ToString();
                model.BQJie     = item["jie"].ToString();
                model.BQDai     = item["dai"].ToString();
                model.QmAmount  = (Utils.StrToInt(subjcetDetail.amount.ToString(), 0) - Utils.StrToInt(item["jie"].ToString(), 0) + Utils.StrToInt(item["dai"].ToString(), 0)).ToString();
                list.Add(model);
            }
            return(list);
        }
Esempio n. 2
0
        private List <StatisEntity> GetStatisList()
        {
            BLL.account        bll              = new BLL.account();
            BLL.xiehui         xiehuiBll        = new BLL.xiehui();
            BLL.subject        subjectBll       = new BLL.subject();
            BLL.subject_detail subjectDetailBll = new BLL.subject_detail();

            var ds   = bll.GetStatisList(this.keywords, 0, Utils.StrToInt(ddlBSubject.SelectedValue, 0), Utils.StrToInt(ddlSSubject.SelectedValue, 0)).Tables[0];
            var list = new List <StatisEntity>();

            foreach (DataRow dr in ds.Rows)
            {
                var xiehui = xiehuiBll.GetModel(Utils.StrToInt(dr["xiehui_id"].ToString(), 0));
                var model  = new StatisEntity();
                model.Town    = xiehui.town;
                model.Village = xiehui.village;
                model.XieHui  = xiehui.name;
                model.XianJin = GetAmount("现金", dr);
                model.YHCK    = GetAmount("银行存款", dr);
                model.JCHZJ   = GetAmount("借出互助金", dr);
                //资产小计=现金+银行存款+借出互助金
                model.ZCXJ = (Utils.StrToInt(model.XianJin, 0) + Utils.StrToInt(model.YHCK, 0) + Utils.StrToInt(model.JCHZJ, 0)).ToString();
                //借出互助资金占比率=资产小计/借出互助金
                model.JCZB  = Utils.StrToInt(model.JCHZJ, 0) == 0 ? "0" : (Utils.StrToInt(model.ZCXJ, 0) / Utils.StrToInt(model.JCHZJ, 0)).ToString();
                model.RHHZ  = GetAmount("会员入会互助金", dr);
                model.ZFHZJ = GetAmount("政府拨入互助资金", dr);
                //负债小计=会员入会互助金+政府拨入互助金
                model.FZXJ = (Utils.StrToInt(model.RHHZ, 0) + Utils.StrToInt(model.ZFHZJ, 0)).ToString();
                //净资产=资产小计-负债小计
                model.JZC  = (Utils.StrToInt(model.ZCXJ, 0) + Utils.StrToInt(model.FZXJ, 0)).ToString();
                model.ZFBZ = GetAmount("政府补助收入", dr);
                model.JCZY = GetAmount("互助金占用费收入", dr);
                model.YWGL = GetAmount("业务管理费收入", dr);
                model.GYJ  = GetAmount("公益金", dr);
                //收入小计=政府补助收入+互助金占用费收入+业务管理费收入+公益金
                model.SRXJ = (Utils.StrToInt(model.ZFBZ, 0) + Utils.StrToInt(model.JCZY, 0) + Utils.StrToInt(model.YWGL, 0) + Utils.StrToInt(model.GYJ, 0)).ToString();
                model.HDZC = GetAmount("业务活动支出", dr);
                //本期结余=收入小计-业务活动支出
                model.BQJY = (Utils.StrToInt(model.SRXJ, 0) + Utils.StrToInt(model.HDZC, 0)).ToString();
                list.Add(model);
            }
            //var list = new List<StatisEntity>()
            //{
            //   new StatisEntity(){Town="漩涡镇",Village="茨沟村",XieHui="漩涡镇茨沟村协会",XianJin="",YHCK="191816.41",JCHZJ="556000.00",ZCXJ="747816.41",JCZB="74.35%",RHHZ="54600.00",ZFHZJ="693780",FZXJ="748380",JZC="-563.59 ",ZFBZ="",JCZY="250.00",GYJ="",SRXJ="1261.41",HDZC="1825",BQJY="-563.59"},

            //   new StatisEntity(){Town="漩涡镇",Village="东河村",XieHui="漩涡镇东河村协会",XianJin="",YHCK="307102.74",JCHZJ="451000.00",ZCXJ="758102.74",JCZB="59.49%",RHHZ="39400.00",ZFHZJ="713420",FZXJ="752820",JZC="5282.74",ZFBZ="",JCZY="5282.74",GYJ="",SRXJ="5282.74",HDZC="",BQJY="5282.74"},

            //   new StatisEntity(){Town="漩涡镇",Village="金星村",XieHui="漩涡镇金星村协会",XianJin="",YHCK="237406.44 ",JCHZJ="555000.00",ZCXJ="792406.44",JCZB="70.04%",RHHZ="48300.00",ZFHZJ="741740",FZXJ="790040",JZC="2366.44",ZFBZ="",JCZY="2366.44",GYJ="",SRXJ="2366.44",HDZC="",BQJY="2366.44"},

            //   new StatisEntity(){Town="漩涡镇",Village="田凤村",XieHui="漩涡镇田凤村协会",XianJin="",YHCK="494204.05",JCHZJ="305000.00",ZCXJ="799204.05",JCZB="38.16%",RHHZ="27000.00",ZFHZJ="770950",FZXJ="797950",JZC="1254.05",ZFBZ="",JCZY="1254.05",GYJ="",SRXJ="1254.05",HDZC="",BQJY="1254.05"},

            //   new StatisEntity(){Town="漩涡镇",Village="田堰村",XieHui="漩涡镇田堰村协会",XianJin="",YHCK="441926.13",JCHZJ="310000.00",ZCXJ="751926.13",JCZB="41.23%",RHHZ="29900.00",ZFHZJ="715700",FZXJ="745600",JZC="6326.13",ZFBZ="",JCZY="8121.13",GYJ="",SRXJ="8121.13",HDZC="1795",BQJY="6326.13"},

            //   new StatisEntity(){Town="漩涡镇",Village="上七村",XieHui="漩涡镇上七村协会",XianJin="",YHCK="500379.17",JCHZJ="",ZCXJ="500379.17",JCZB="0.00%",RHHZ="",ZFHZJ="500000",FZXJ="500000",JZC="379.17",ZFBZ="",JCZY="379.17",GYJ="",SRXJ="379.17",HDZC="",BQJY="379.17"},

            //   new StatisEntity(){Town="漩涡镇",Village="龙泉村",XieHui="漩涡镇龙泉村协会",XianJin="237",YHCK="170990.74",JCHZJ="370000.00",ZCXJ="541227.74",JCZB="68.36%",RHHZ="42700.00",ZFHZJ="500000",FZXJ="542700",JZC="-1472.26",ZFBZ="",JCZY="290.74",GYJ="",SRXJ="290.74",HDZC="1763",BQJY="-1472.26"},

            //   new StatisEntity(){Town="漩涡镇",Village="中银村",XieHui="漩涡镇中银村协会",XianJin="47",YHCK="246524.64",JCHZJ="412000.00",ZCXJ="658571.64",JCZB="62.56%",RHHZ="41900.00",ZFHZJ="600000",FZXJ="641900",JZC="16671.64",ZFBZ="",JCZY="18576.64",GYJ="",SRXJ="18576.64",HDZC="1905",BQJY="16671.64"},
            //};
            return(list);
            //BLL.account bll = new BLL.account();
            //var ds = bll.GetStatisList(this.keywords,1, Utils.StrToInt(this.bSubject, 0), Utils.StrToInt(this.sSubject, 0)).Tables[0];
            //var list = new List<StatisEntity>();
            //foreach (DataRow item in ds.Rows)
            //{
            //    BLL.subject_detail subjectDetailBll = new BLL.subject_detail();
            //    var subjcetDetail = subjectDetailBll.GetModel(Utils.StrToInt(item["b_subject"].ToString(), 0), Utils.StrToInt(item["s_subject"].ToString(), 0));
            //    if (subjcetDetail == null)
            //    {
            //        continue;
            //    }
            //    var model = new StatisEntity();
            //    BLL.xiehui xiehuiBll = new BLL.xiehui();
            //    var xiehui = xiehuiBll.GetModel(Utils.StrToInt(item["xiehui_id"].ToString(), 0));

            //    BLL.subject subjectBll = new BLL.subject();
            //    var bSubjectName = subjectBll.GetName(Utils.StrToInt(item["b_subject"].ToString(), 0));
            //    var sSubjectName = subjectBll.GetName(Utils.StrToInt(item["s_subject"].ToString(), 0));

            //    model.Town = xiehui.town;
            //    model.Village = xiehui.village;
            //    model.XieHui = xiehui.name;
            //    model.BBSubjcet = bSubjectName;
            //    model.SSbuject = sSubjectName;
            //    model.Amount = subjcetDetail.amount.ToString();
            //    model.BQJie = item["jie"].ToString();
            //    model.BQDai = item["dai"].ToString();
            //    model.QmAmount = (Utils.StrToInt(subjcetDetail.amount.ToString(), 0) - Utils.StrToInt(item["jie"].ToString(), 0) + Utils.StrToInt(item["dai"].ToString(), 0)).ToString();
            //    list.Add(model);
            //}
            //return list;
        }