Ejemplo n.º 1
0
        private void RenderMap(HtmlTextWriter writer, MapColumnChart chart)
        {
            writer.WriteLine();
            writer.AddAttribute(HtmlTextWriterAttribute.Name, "Map" + this.UniqueID);
            writer.RenderBeginTag("MAP");

            foreach (Rectangle rect in chart.Rects)
            {
                writer.AddAttribute("SHAPE","rect");
                writer.AddAttribute("COORDS", String.Format("{0},{1},{2},{3}", rect.Left, rect.Top, rect.Right,rect.Bottom));
                //writer.AddAttribute("HREF", Page.GetPostBackClientHyperlink(this, rect.ToString ()));
                writer.AddAttribute("HREF", Page.ClientScript.GetPostBackClientHyperlink(this, rect.ToString()));
                writer.RenderBeginTag(HtmlTextWriterTag.Area);
                writer.RenderEndTag();
            }
            writer.WriteEndTag("MAP");
        }
Ejemplo n.º 2
0
        protected void GetStudentInfoIntoContactByYear(int year)
        {
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider stdprovider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            int StdSum = stdprovider.GetStudentCount(year, false);
            int haveContact = stdprovider.GetStdCountByContatorAndYear(year, false);
            int noContact = StdSum - haveContact;
            Hashtable table = new Hashtable();
            table.Add("是", haveContact);
            table.Add("无", noContact);
            StdInfo.InnerHtml = "";
            StringBuilder sb = new StringBuilder();

            dtable = new DataTable();
            dtable.Columns.Add("是否有联系人");
            dtable.Columns.Add("人数");

            if (StdSum > 0)
            {
                sb.Append("<span>有联系人数:</span>" + haveContact + "<br>");
                sb.Append("<span>无联系人数:</span>" + noContact + "");
                StdInfo.InnerHtml = sb.ToString();

                DataRow dr1 = dtable.NewRow();
                dr1.SetField("是否有联系人", "有");
                dr1.SetField("人数", haveContact);
                dtable.Rows.Add(dr1);
                DataRow dr2 = dtable.NewRow();
                dr2.SetField("是否有联系人", "无");
                dr2.SetField("人数", noContact);
                dtable.Rows.Add(dr2);
                Chart1.YValuesInterval = StdSum / 10;
            }
            else
            {
                StdInfo.InnerHtml = "学生人数为0";
            }
            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            foreach (DictionaryEntry stdinfo in table)
            {
                float value = (float)Convert.ToInt32(stdinfo.Value);
                cl.Data.Add(new ChartPoint(stdinfo.Key.ToString(), value));
            }
            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }
Ejemplo n.º 3
0
        //按年份统计入就业信息
        protected void GetEduLevelStdPreByYear(int year)
        {
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider stdprovider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            Hashtable table = stdprovider.GetStudentIntoEnterpriseByYear(year, true);

            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            StringBuilder sb = new StringBuilder();
            dtable = new DataTable();
            dtable.Columns.Add("企业");
            dtable.Columns.Add("人数");
            int maxstdnum = 0;
            foreach (DictionaryEntry stdinfo in table)
            {
                float value = (float)Convert.ToInt32(stdinfo.Value);
                cl.Data.Add(new ChartPoint(stdinfo.Key.ToString(), value));
                sb.Append("<span>" + stdinfo.Key.ToString() + ":</span>&nbsp<span>" + Convert.ToInt32(stdinfo.Value) + "人</span><br>");

                DataRow dr = dtable.NewRow();
                dr.SetField("企业", stdinfo.Key.ToString());
                dr.SetField("人数", Convert.ToInt32(stdinfo.Value));
                dtable.Rows.Add(dr);
                if (maxstdnum < Convert.ToInt32(stdinfo.Value))
                    maxstdnum = Convert.ToInt32(stdinfo.Value);
            }
            Chart1.YValuesInterval = maxstdnum / 10;
            StdInfo.InnerHtml = sb.ToString();
            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }
Ejemplo n.º 4
0
        protected void GetStudentInfoIntoAreaByYear(int year)
        {
            Hashtable areaStudent = new Hashtable();
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider studentProvider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            areaStudent = studentProvider.GroupStudentsIntoAreaByYear(year, true);
            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            StdInfo.InnerHtml = "";
            dtable = new DataTable();
            dtable.Columns.Add("地区");
            dtable.Columns.Add("人数");
            int maxstdnum = 0;
            foreach (DictionaryEntry dic in areaStudent)
            {
                string area = dic.Key.ToString();
                if (area.Contains("重庆市"))
                {
                    area = area.Substring(3, 2);
                }
                float nbr = float.Parse(dic.Value.ToString());
                cl.Data.Add(new ChartPoint(area, nbr));

                DataRow dr = dtable.NewRow();
                dr.SetField("地区", dic.Key.ToString());
                dr.SetField("人数", Convert.ToInt32(dic.Value));
                dtable.Rows.Add(dr);
                if (maxstdnum < Convert.ToInt32(dic.Value))
                    maxstdnum = Convert.ToInt32(dic.Value);
            }
            Chart1.YValuesInterval = maxstdnum / 10;
            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }
Ejemplo n.º 5
0
        //按年份统计退学比例
        protected void GetDropOutStdPreByYear(int year)
        {
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider stdprovider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            int StdSum = stdprovider.GetStudentCount(year, true);
            int DropOutSum = stdprovider.GetStudentsNbrOfLeavingSchool(year, true);
            int NotDropOut = StdSum - DropOutSum;
            Hashtable table = new Hashtable();
            table.Add("流失人数", DropOutSum);
            table.Add("注册人数", NotDropOut);
            StdInfo.InnerHtml = "";
            dtable = new DataTable();
            dtable.Columns.Add("状态");
            dtable.Columns.Add("人数");

            if (StdSum > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<span>流失人数:</span>" + DropOutSum + "<br>");
                sb.Append("<span>注册人数:</span>" + NotDropOut + "");
                StdInfo.InnerHtml = sb.ToString();

                DataRow dr1 = dtable.NewRow();
                dr1.SetField("状态", "流失");
                dr1.SetField("人数", DropOutSum);
                dtable.Rows.Add(dr1);
                DataRow dr2 = dtable.NewRow();
                dr2.SetField("状态", "注册");
                dr2.SetField("人数", NotDropOut);
                dtable.Rows.Add(dr2);
                Chart1.YValuesInterval = StdSum / 10;
            }
            else
            {
                StdInfo.InnerHtml = "学生人数为0";
            }
            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            foreach (DictionaryEntry stdinfo in table)
            {
                float value = (float)Convert.ToInt32(stdinfo.Value);
                cl.Data.Add(new ChartPoint(stdinfo.Key.ToString(), value));
            }
            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }
Ejemplo n.º 6
0
        //按年份统计侨胞信息
        protected void GetStudentOverSeaInfoByYear(int year)
        {
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider stdprovider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            int StdSum = stdprovider.GetStudentCount(year, true);
            int OverSeaStdSum = stdprovider.GetResiderAbroadNbrByYear(year, true);
            int NotOverSeaStdSum = StdSum - OverSeaStdSum;
            Hashtable table = new Hashtable();
            table.Add("侨胞", OverSeaStdSum);
            StdInfo.InnerHtml = "";
            dtable = new DataTable();
            dtable.Columns.Add("侨胞与否");
            dtable.Columns.Add("人数");
            if (StdSum > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<span>侨胞:</span>" + OverSeaStdSum + "人<br>");
                sb.Append("<span>非侨胞:</span>" + NotOverSeaStdSum + "人");
                StdInfo.InnerHtml = sb.ToString();

                DataRow dr1 = dtable.NewRow();
                dr1.SetField("侨胞与否", "是");
                dr1.SetField("人数", OverSeaStdSum);
                dtable.Rows.Add(dr1);
                DataRow dr2 = dtable.NewRow();
                dr2.SetField("侨胞与否", "否");
                dr2.SetField("人数", NotOverSeaStdSum);
                dtable.Rows.Add(dr2);
                Chart1.YValuesInterval = StdSum / 10;
            }
            else
            {
                StdInfo.InnerHtml = "学生人数为0";
            }
            table.Add("非侨胞", NotOverSeaStdSum);
            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            foreach (DictionaryEntry stdinfo in table)
            {
                float value = (float)Convert.ToInt32(stdinfo.Value);
                cl.Data.Add(new ChartPoint(stdinfo.Key.ToString(), value));
            }
            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }
Ejemplo n.º 7
0
        //按年份统计城乡比例
        protected void GetResStdPreByYear(int year)
        {
            CY.GFive.DALProviders.SqlServerProvider.StudentProvider stdprovider = new CY.GFive.DALProviders.SqlServerProvider.StudentProvider();
            int StdSum = stdprovider.GetStudentCount(year, false);
            int CStdSum = stdprovider.GetRuralStudentsNbrByYear(year, false);
            int CitySum = StdSum - CStdSum;
            Hashtable table = new Hashtable();
            table.Add("农村人数", CStdSum);
            table.Add("城市人数", CitySum);

            dtable = new DataTable();
            dtable.Columns.Add("状态");
            dtable.Columns.Add("人数");

            StdInfo.InnerHtml = "";
            if (StdSum > 0)
            {
                StringBuilder sb = new StringBuilder();
                sb.Append("<span>农村人数:</span>" + CStdSum + "人<br>");
                sb.Append("<span>城市人数数:</span>" + CitySum + "人");
                StdInfo.InnerHtml = sb.ToString();

                DataRow dr1 = dtable.NewRow();
                dr1.SetField("状态", "农村");
                dr1.SetField("人数", CStdSum);
                dtable.Rows.Add(dr1);
                DataRow dr2 = dtable.NewRow();
                dr2.SetField("状态", "城市");
                dr2.SetField("人数", CitySum);
                dtable.Rows.Add(dr2);
                Chart1.YValuesInterval = StdSum / 10;
            }
            else
            {
                StdInfo.InnerHtml = "学生人数为0";
            }
            MapColumnChart cl = new MapColumnChart();
            cl.Fill.Color = Color.BlueViolet;
            foreach (DictionaryEntry stdinfo in table)
            {
                float value = (float)Convert.ToInt32(stdinfo.Value);
                cl.Data.Add(new ChartPoint(stdinfo.Key.ToString(), value));
            }

            cl.Rects = new ArrayList();
            Chart1.Charts.Add(cl);
            Chart1.RedrawChart();
        }