예제 #1
0
        /// <summary>
        /// 绑定下拉列表
        /// </summary>
        public void bindDroplist()
        {
            Maticsoft.BLL.Nation nation_bll = new Maticsoft.BLL.Nation();
            this.U_NationID.DataSource = nation_bll.GetAllList();
            this.U_NationID.DataValueField = "NationID";
            this.U_NationID.DataTextField = "N_Name";
            this.U_NationID.DataBind();

            Maticsoft.BLL.commonDiseases commonDiseases_bll = new Maticsoft.BLL.commonDiseases();
            commonDiseases_list = commonDiseases_bll.GetModelList("CommonDiseaseID < 11");
            DiseaseHistory_repeater.DataSource = commonDiseases_list;
            DiseaseHistory_repeater.DataBind();

            fatherDisease_repeater.DataSource = commonDiseases_list;
            fatherDisease_repeater.DataBind();

            matherDisease_repeater.DataSource = commonDiseases_list;
            matherDisease_repeater.DataBind();

            brothersDisease_repeater.DataSource = commonDiseases_list;
            brothersDisease_repeater.DataBind();

            childrenDisease_repeater.DataSource = commonDiseases_list;
            childrenDisease_repeater.DataBind();
        }
예제 #2
0
        /// <summary>
        /// �������
        /// </summary>
        private void BindData()
        {
            string GroupIDs = "", strWhere = "";
            int sum = 0, temp = 0;
            int[] datas;
            Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group();
            int groupID = UserData.GetUserDate.U_GroupID;
            if (UserData.GetUserDate.U_Type == 0)
                title = "ȫ��������������ͳ��";
            else
            {
                title = sys_Group_bll.GetModel(groupID).G_CName + "������������ͳ��";
                GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false);
            }

            Maticsoft.BLL.commonDiseases commonDiseases_bll = new Maticsoft.BLL.commonDiseases();
            List<Maticsoft.Model.commonDiseases> list = commonDiseases_bll.GetModelList("");
            Maticsoft.Model.commonDiseases commonDiseases_model = new Maticsoft.Model.commonDiseases();
            datas = new int[list.Count];

            Maticsoft.BLL.extend_UserDisease extend_UserDisease_bll = new Maticsoft.BLL.extend_UserDisease();
            if (GroupIDs != "")
            {
                strWhere = "DH_Type={0} and U_Committee in ({1})";
                for (int i = 0; i < list.Count; i++)
                {
                    commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                    datas[i] = temp = extend_UserDisease_bll.GetRecordCount(string.Format(strWhere, commonDiseases_model.CommonDiseaseID, GroupIDs));
                    sum += temp;
                }
            }
            else
            {
                strWhere = "DH_Type={0}";
                for (int i = 0; i < list.Count; i++)
                {
                    commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                    datas[i] = temp = extend_UserDisease_bll.GetRecordCount(string.Format(strWhere, commonDiseases_model.CommonDiseaseID));
                    sum += temp;
                }
            }

            for (int i = 0; i < list.Count; i++)
            {
                if (i != 0)
                {
                    data = data + ",";
                    categories = categories + ",";
                }
                float per = (float)Math.Round((decimal)datas[i] / sum * 100, 1);
                data = data + "{" + string.Format("y: {0}, color: colors[{1}]", datas[i], i) + "}";
                commonDiseases_model = (Maticsoft.Model.commonDiseases)list[i];
                categories = categories + string.Format("'{0}'", commonDiseases_model.CD_Name);
                table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", commonDiseases_model.CD_Name, datas[i], per);
            }
        }