/// <summary> /// ���б����� /// </summary> private void BindData() { string GroupIDs = "", strWhere = ""; decimal han_p, other_p; int han, other; 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.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo(); if (GroupIDs != "") { strWhere = "U_NationID={0} and U_Committee in ({1})"; han = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, GroupIDs)); other = sys_UserInfo_bll.GetRecordCount(string.Format("U_NationID<>{0} and U_Committee in ({1})", 1,GroupIDs)); } else { strWhere = "U_NationID={0}"; han = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1)); other = sys_UserInfo_bll.GetRecordCount(string.Format("U_NationID<>{0}", 1)); } han_p = Math.Round((decimal)han/(han + other), 3); other_p = 1 - han_p; data = string.Format("['����', {0}],['����', {1}]", han_p, other_p); table_data = string.Format("<tr class='body'><td>����</td><td>{0}</td><td>{1}%</td></tr><tr class='body'><td>����</td><td>{2}</td><td>{3}%</td></tr>", han, (float)han_p * 100, other, (float)other_p * 100); }
/// <summary> /// ���б����� /// </summary> private void BindData() { string GroupIDs = "", strWhere = ""; decimal man_p, woman_p; int man, woman; 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.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo(); if (GroupIDs != "") { strWhere = "U_Sex={0} and U_Committee in ({1})"; man = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, GroupIDs)); woman = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, GroupIDs)); } else { strWhere = "U_Sex={0}"; man = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1)); woman = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0)); } man_p = Math.Round((decimal)man / (man + woman),3); woman_p = 1 - man_p; data = string.Format("['����', {0}],['Ů��', {1}]",man_p, woman_p); table_data = string.Format("<tr class='body'><td>����</td><td>{0}</td><td>{1}%</td></tr><tr class='body'><td>Ů��</td><td>{2}</td><td>{3}%</td></tr>", man, (float)man_p * 100, woman, (float)woman_p * 100); }
/// <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.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo(); List<Maticsoft.Model.sys_Group> list = new List<Maticsoft.Model.sys_Group>(); Maticsoft.Model.sys_Group sys_Group_model = new Maticsoft.Model.sys_Group(); if (GroupIDs != "") { list = sys_Group_bll.GetModelList(string.Format("G_Level={0} and GroupID in ({1}) ", 5, GroupIDs)); datas = new int[list.Count]; strWhere = "U_Committee={0}"; for (int i = 0; i < list.Count; i++) { sys_Group_model = (Maticsoft.Model.sys_Group)list[i]; datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, sys_Group_model.GroupID)); sum += temp; } } else { list = sys_Group_bll.GetModelList(string.Format("G_Level={0} ", 5)); datas = new int[list.Count]; strWhere = "U_Committee={0}"; for (int i = 0; i < list.Count; i++) { sys_Group_model = (Maticsoft.Model.sys_Group)list[i]; datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, sys_Group_model.GroupID)); 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("{0}", datas[i]); sys_Group_model = (Maticsoft.Model.sys_Group)list[i]; categories = categories + string.Format("'{0}'", sys_Group_model.G_CName); table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", sys_Group_model.G_CName, datas[i], per); } }
/// <summary> /// ���б����� /// </summary> private void BindData() { categories = new string[]{"����ְ������ҽ�Ʊ���", "����������ҽ�Ʊ���", "ƶ������", "����ũ�����ҽ��", "��ҵҽ�Ʊ���", "ȫ����", "ȫ�Է�", "����"}; string GroupIDs = "", strWhere = ""; int[] datas = new int[8]; int sum = 0, temp; 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.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo(); if (GroupIDs != "") { for (int i = 0; i < datas.Length; i++) { strWhere = "U_PaymentType={0} and U_Committee in ({1})"; datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, i+1, GroupIDs)); sum += temp; } } else { strWhere = "U_PaymentType={0}"; for (int i = 0; i < datas.Length; i++) { strWhere = "U_PaymentType={0}"; datas[i] = temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, i+1)); sum += temp; } } for (int i = 0; i < datas.Length; i++) { if (i != 0) data = data + ","; float per = (float)Math.Round((decimal)datas[i] / sum * 100,1); data = data + "{" + string.Format("y: {0}, color: colors[{1}]", per, i) + "}"; table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}%</td></tr>", categories[i], datas[i], per); } }
/// <summary> /// ������� /// </summary> private void BindData() { string orderby = OrderType == 0 ? Orderfld + " asc" : Orderfld + " desc"; int startIndex = (this.AspNetPager1.CurrentPageIndex - 1) * this.AspNetPager1.PageSize + 1; int endIndex = this.AspNetPager1.CurrentPageIndex * this.AspNetPager1.PageSize; Maticsoft.BLL.sys_UserInfo bll = new Maticsoft.BLL.sys_UserInfo(); DataSet datas = bll.GetListByPage(SearchTerms, orderby, startIndex, endIndex); GridView1.DataSource = datas; GridView1.DataBind(); this.AspNetPager1.RecordCount = bll.GetRecordCount(SearchTerms); }
/// <summary> /// ���б����� /// </summary> private void BindData() { string GroupIDs = "", strWhere = "", manStr = "", womanStr ="", age_duration = ""; Maticsoft.BLL.sys_Group sys_Group_bll = new Maticsoft.BLL.sys_Group(); int groupID = UserData.GetUserDate.U_GroupID; int man_temp = 0, woman_temp = 0; if (UserData.GetUserDate.U_Type == 0) title = "ȫ�����������Ա�ֲ�ͳ��"; else { title = sys_Group_bll.GetModel(groupID).G_CName + "���������Ա�ֲ�ͳ��"; GroupIDs = sys_Group_bll.GetLowerLevelString_withSelf(groupID, false); //���ص�ǰ���ŵ������¼����� } int year = DateTime.Now.Year; Maticsoft.BLL.sys_UserInfo sys_UserInfo_bll = new Maticsoft.BLL.sys_UserInfo(); if (GroupIDs != "") { strWhere = "U_Sex={0} and U_BirthDay>'{1}-12-31' and U_BirthDay<='{2}-12-31' and U_Committee in ({3})"; for (int i = 0; i <= 10; i++) { if (i != 0) { manStr = manStr + ","; womanStr = womanStr + ","; } man_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, year - (i + 1) * 10, year - i * 10, GroupIDs)); manStr = manStr + "-" + man_temp; woman_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, year - (i + 1) * 10, year - i * 10, GroupIDs)); womanStr = womanStr + woman_temp; if(i != 10) age_duration = i * 10 + "-" + ((i + 1) * 10 - 1); else age_duration = "100+"; table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}</td></tr>", age_duration, man_temp, woman_temp); } } else { strWhere = "U_Sex={0} and U_BirthDay>'{1}-12-31' and U_BirthDay<='{2}-12-31'"; for (int i = 0; i <= 10; i++) { if (i != 0) { manStr = manStr + ","; womanStr = womanStr + ","; } man_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 1, year - (i + 1) * 10, year - i * 10)); manStr = manStr + "-" + man_temp; woman_temp = sys_UserInfo_bll.GetRecordCount(string.Format(strWhere, 0, year - (i + 1) * 10, year - i * 10)); womanStr = womanStr + woman_temp; if (i != 10) age_duration = i * 10 + "-" + ((i + 1) * 10 - 1); else age_duration = "100+"; table_data = table_data + string.Format("<tr class='body'><td>{0}</td><td>{1}</td><td>{2}</td></tr>", age_duration, man_temp, woman_temp); } } man_data = string.Format("[{0}]", manStr); woman_data = string.Format("[{0}]", womanStr); }