Exemple #1
0
    protected void Menu1_MenuItemClick(object sender, MenuEventArgs e)
    {
        int index = Int32.Parse(e.Item.Value);

        MultiView1.ActiveViewIndex = index;

        if (index == 0)
        {
            DataSet ds = new DataSet();
            ds = objserver.GetDateset("select * from tbl_Process");
            if (ds.Tables[0].Rows.Count > 0)
            {
                Grid_proc.DataSource = ds.Tables[0];
                Grid_proc.DataBind();
            }
        }
        else if (index == 1)
        {
            DataSet ds = new DataSet();
            ds = objserver.GetDateset("select * from tbl_PartNo");
            if (ds.Tables[0].Rows.Count > 0)
            {
                Grid_of.DataSource = ds.Tables[0];
                Grid_of.DataBind();
            }
        }
        else if (index == 2)
        {
            DataSet ds = new DataSet();
            ds = objserver.GetDateset("select * from Frequency");
            if (ds.Tables[0].Rows.Count > 0)
            {
                grd_frequency.DataSource = ds.Tables[0];
                grd_frequency.DataBind();
            }
        }
        else if (index == 3)
        {
            DataSet ds = new DataSet();
            ds = objserver.GetDateset("select * from cell");
            if (ds.Tables[0].Rows.Count > 0)
            {
                grd_unit.DataSource = ds.Tables[0];
                grd_unit.DataBind();
            }
        }
        else if (index == 4)
        {
            DataSet ds = new DataSet();
            ds = objserver.GetDateset("select * from Machine");
            if (ds.Tables[0].Rows.Count > 0)
            {
                grd_mach.DataSource = ds.Tables[0];
                grd_mach.DataBind();
            }
        }
    }
Exemple #2
0
    public void Loadproc()
    {
        DataSet ds = new DataSet();

        ds = objserver.GetDateset("select * from tbl_Process");
        if (ds.Tables[0].Rows.Count > 0)
        {
            Grid_proc.DataSource = ds.Tables[0];
            Grid_proc.DataBind();
        }
    }