コード例 #1
0
ファイル: Default.aspx.cs プロジェクト: ddssssdd/TrainCheck
    private void bindData()
    {
        DictSpecs ds = new DictSpecs();
        Orion.Common.ISQLService sql = ds.Persistence.sql;
        DataView dv1 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_area"));
        Chart1.Series[0].Points.DataBindXY(dv1, "description", dv1, "no1");

        DataView dv2 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_factory"));
        Chart2.Series[0].Points.DataBindXY(dv2, "description", dv2, "no1");
        DataView dv3 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_section"));
        Chart3.Series[0].Points.DataBindXY(dv3, "description", dv3, "no1");
    }
コード例 #2
0
ファイル: Default.aspx.cs プロジェクト: mirror4/TrainCheck
    private void bindData()
    {
        if (String.IsNullOrEmpty(txtEnd.Text))
        {
            return;
        }
        if (String.IsNullOrEmpty(txtBegin.Text))
        {
            return;
        }
        DateTime d1;
        DateTime d2;

        try
        {
            d1 = Convert.ToDateTime(txtBegin.Text);
            d2 = Convert.ToDateTime(txtEnd.Text);
        }
        catch (Exception e)
        {
            txtBegin.Text = "";
            txtEnd.Text   = "";
            return;
        }

        Session["SelectDateBegin"] = txtBegin.Text;
        Session["SelectDateEnd"]   = txtEnd.Text;
        string f = "%";

        if (Request["factory"] != null)
        {
            f = Request["factory"];
        }

        DictSpecs ds        = new DictSpecs();
        String    sqlstring = String.Format(@"select area,factory,section,sum(checkposition) as checkposition,
sum(passPosition) as passPosition,SectionNo as AreaNo from vw_jobmain2 where factory='{2}' and jobdate between '{0}' and '{1}' 
group by area,factory,section,sectionNo", txtBegin.Text, d2.AddDays(1).ToString("yyyy-MM-dd"), f);
        DataTable dt        = ds.Persistence.sql.ExecuteDataTable(sqlstring);

        grdMain.DataSource = dt;
        grdMain.DataBind();
        DataView dv = new DataView(dt);


        Chart3.Series[0].Points.DataBindXY(dv, "section", dv, "checkPosition");
        Chart3.Series[1].Points.DataBindXY(dv, "section", dv, "passPosition");
        Chart3.Series[2].Points.DataBindXY(dv, "section", dv, "AreaNo");
        Orion.Common.ISQLService sql = ds.Persistence.sql;
        //DataView dvArea = new DataView(sql.ExecuteDataTable(""));
    }
コード例 #3
0
    private void bindData()
    {
        DictSpecs ds = new DictSpecs();

        Orion.Common.ISQLService sql = ds.Persistence.sql;
        DataView dv1 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_area"));

        Chart1.Series[0].Points.DataBindXY(dv1, "description", dv1, "no1");

        DataView dv2 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_factory"));

        Chart2.Series[0].Points.DataBindXY(dv2, "description", dv2, "no1");
        DataView dv3 = new DataView(sql.ExecuteDataTable("select description,no1 from vw_section"));

        Chart3.Series[0].Points.DataBindXY(dv3, "description", dv3, "no1");
    }
コード例 #4
0
ファイル: Default.aspx.cs プロジェクト: ddssssdd/TrainCheck
    private void bindData()
    {
        if (String.IsNullOrEmpty(txtEnd.Text))
            return;
        if (String.IsNullOrEmpty(txtBegin.Text))
            return;
        DateTime d1;
        DateTime d2;
        try
        {
            d1 = Convert.ToDateTime(txtBegin.Text);
            d2 = Convert.ToDateTime(txtEnd.Text);
        }
        catch (Exception e)
        {
            txtBegin.Text = "";
            txtEnd.Text = "";
            return;
        }

        Session["SelectDateBegin"] = txtBegin.Text;
        Session["SelectDateEnd"] = txtEnd.Text;
        string f = "%";
        if (Request["factory"] != null)
        {
            f = Request["factory"];
        }

        DictSpecs ds = new DictSpecs();
        String sqlstring =String.Format(@"select area,factory,section,sum(checkposition) as checkposition,
        sum(passPosition) as passPosition,SectionNo as AreaNo from vw_jobmain2 where factory='{2}' and jobdate between '{0}' and '{1}'
        group by area,factory,section,sectionNo",txtBegin.Text,d2.AddDays(1).ToString("yyyy-MM-dd"),f);
        DataTable dt = ds.Persistence.sql.ExecuteDataTable(sqlstring);
        grdMain.DataSource = dt;
        grdMain.DataBind();
        DataView dv = new DataView(dt);

        Chart3.Series[0].Points.DataBindXY(dv, "section", dv, "checkPosition");
        Chart3.Series[1].Points.DataBindXY(dv, "section", dv, "passPosition");
        Chart3.Series[2].Points.DataBindXY(dv, "section", dv, "AreaNo");
        Orion.Common.ISQLService sql = ds.Persistence.sql;
        //DataView dvArea = new DataView(sql.ExecuteDataTable(""));
    }