Click here to Skip to main content
15,901,122 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using System.Data;
using System.Drawing.Imaging;
using System.Drawing;
using Game;
using System.Collections;
public partial class _Default : System.Web.UI.Page
{
    phoneapi _obj = new phoneapi();
    ManagePointMaster _ManagePointMaster = new ManagePointMaster();
    protected void Page_Load(object sender, EventArgs e)
    {
        M_getreport();
    }
    private void M_getreport()
    {
        String _strdata = "<chart palette="2" caption="Sales Comparison" showvalues="1" bgcolor="F7F7F7, E9E9E9" numvdivlines="10" drawanchors="0" numberprefix="$" divlinealpha="30" alternatehgridalpha="20" setadaptiveymin="1">";
        ArrayList ItemList = new ArrayList();
        ItemList.Add("JA");
        ItemList.Add("FB");
        ItemList.Add("MR");
        ItemList.Add("AP");
        ItemList.Add("MA");
        ItemList.Add("JU");
        ItemList.Add("JL");
        ItemList.Add("AU");
        ItemList.Add("SE");
        ItemList.Add("OC");
        Int32 _loop = 9 - 4;
        _strdata += "<categories>";
        for (int i = 0; i < _loop; i++)
        {
            _strdata += "<category label="" + ItemList[i] + "" /> ";
        }

        String _lastyer = "0";
        _strdata += "</categories>";

        
        DataSet _ds = _ManagePointMaster.SP_checkreport(2009, 2012, 4, 9);
        for (int i = 0; i < _ds.Tables[0].Rows.Count; i++)
        {
            if(_lastyer!=_ds.Tables[0].Rows[i]["year"].ToString())
            {
                if (_lastyer != "0")
                {
                    _strdata += "";
                }
                _strdata += "<dataset seriesname="" + _ds.Tables[0].Rows[i]["year"].ToString() + "" color="A66EDD">";
               
                _lastyer = _ds.Tables[0].Rows[i]["year"].ToString();
            }

            _strdata += "<set value="" + _ds.Tables[0].Rows[i]["LID"].ToString() + "" /> ";
        }
        _strdata += "</dataset>";
        _strdata += "<styles>";
        _strdata += "<definition>";
        _strdata += "<style name='XScaleAnim' type='ANIMATION' duration='0.5' start='0' param='_xScale' />";
        _strdata += "<style name='YScaleAnim' type='ANIMATION' duration='0.5' start='0' param='_yscale' />";
        _strdata += "<style name='XAnim' type='ANIMATION' duration='0.5' start='0' param='_yscale' />";
        _strdata += "<style name='AlphaAnim' type='ANIMATION' duration='0.5' start='0' param='_alpha' />";
        _strdata += "</definition>";

        _strdata += "<application>";
        _strdata += "<apply toobject="CANVAS" styles="XScaleAnim, YScaleAnim,AlphaAnim" />";
        _strdata += "<apply toobject="DIVLINES" styles="XScaleAnim,AlphaAnim" />";
        _strdata += "<apply toobject="VDIVLINES" styles="YScaleAnim,AlphaAnim" />";
        _strdata += "<apply toobject="HGRID" styles="YScaleAnim,AlphaAnim" />";
        _strdata += "</application>";

        _strdata += " </styles>";
        _strdata += "</chart>";

        txtdescc.Text = _strdata;
        //Response.Write(_strdata);

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int iLen = flupUpload.PostedFile.ContentLength;
        byte[] btArr = new byte[iLen];
        flupUpload.PostedFile.InputStream.Read(btArr, 0, iLen);
        _obj.Base64ToImage(Convert.ToBase64String(btArr), flupUpload.FileName);
        //_obj.BinaryToImage(btArr, "abc.jpg");
        Response.Write(Convert.ToBase64String(btArr));
    }
}


//Create proc SP_checkreport--SP_checkreport 2009,2012,3,6
//(
// @fromyear int ,
// @toyear int ,
// @frommonth int, 
// @tomonth int 


//)
//as
//--declare @fromyear int 
//--declare @toyear int 

//--declare @frommonth int 
//--declare @tomonth int 


//--set @fromyear=2009
//--set @toyear=2012
//--set @frommonth=3
//--set @tomonth=5
//--declare @int int 
//--set @int=@toyear-@fromyear
//--select @int as Total
//select LID,year(CreateDate) as [Year],month(CreateDate) as [Month] from SM_GameLocation 
//where year(CreateDate) between  @fromyear and @toyear 
//and
//month(CreateDate) between  @frommonth and @tomonth
//order by year(CreateDate) asc
Posted
Updated 20-Jun-12 2:22am
v2
Comments
Prasad_Kulkarni 21-Jun-12 6:41am    
Glad it helps!
Thank you for 'Accepting Solution'.

1 solution

Refer similar discussion: the fusion Chart in C#[^]

CP Search: Click here[^]
 
Share this answer
 
Comments
Maciej Los 20-Jun-12 9:09am    
Nice links ;) +5!
Prasad_Kulkarni 20-Jun-12 23:34pm    
Thank you :)

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900