Ejemplo n.º 1
0
    private void bindDiary()
    {
        SqlDataAdapter addiary, addiary1;

        // B7
        addiary  = new SqlDataAdapter("select DiaryEntry.DiaryNo,DiaryEntry.Diary,DiaryEntry.Status,DiaryEntry.CourierNo as RefNo,DiaryEntry.IMID as Membership from DiaryEntry where SubmittedTo='Project'and Status='ProReceive' and DiaryNo in (select DairyNo from DairyCount where Department='Project') and ExamSession='" + lblHiddenSeason.Text + "'", con);
        addiary1 = new SqlDataAdapter("select DiaryEntry.DiaryNo,DiaryEntry.Diary,DiaryEntry.Status,DiaryEntry.CourierNo as RefNo,DiaryEntry.IMID as Membership from DiaryEntry where SubmittedTo='Project'and Status='CountDispatch' and DiaryNo in (select DairyNo from DairyCount where Department='Account') and ExamSession='" + lblHiddenSeason.Text + "'", con);
        DataTable ds = new DataTable();

        addiary.Fill(ds);
        addiary1.Fill(ds);
        GridDiaryNo.DataSource = ds;
        GridDiaryNo.DataBind();
        //B6
        addiary = new SqlDataAdapter("select DairyNo,Status,IMID from DairyCount where DairyNo IN (select Distinct DiaryNo From DiaryEntry where Status='CountDispatch' and ExamSession='" + lblHiddenSeason.Text.ToString() + "') and Department='Project' order by DairyNo desc", con);
        DataTable dt = new DataTable();

        addiary.Fill(dt);
        GrdCountDispatch.DataSource = dt;
        GrdCountDispatch.DataBind();
        //B8
        addiary = new SqlDataAdapter("select Status,DairyNo,IMID,DDRcv,DDSub,ProformaARcv,ProformaASub,ProformaBRcv,ProformaBSub,CurrentDate from Projectcount where Session='" + lblHiddenSeason.Text + "' and dairyNo in(select DiaryNo from DiaryEntry where SubmittedTo='Project') order by DairyNo desc", con);
        DataTable dt1 = new DataTable();

        addiary.Fill(dt1);
        GridProject.DataSource = dt1;
        GridProject.DataBind();
    }
Ejemplo n.º 2
0
    private void bindDiary()
    {
        SqlDataAdapter addiary = new SqlDataAdapter("select Distinct DiaryNo,Diary,Status,CourierNo as RefNo,MembershipNo as Membership From DiaryEntry where Status='AccReceive' and ExamSession='" + lblHiddenSeason.Text.ToString() + "' order by Diary desc", con);
        DataSet        ds      = new DataSet();

        addiary.Fill(ds);
        if (ds.Tables[0].ToString() != "")
        {
            GridDiaryNo.DataSource = ds;
            GridDiaryNo.DataBind();
        }

        SqlDataAdapter countDispatch = new SqlDataAdapter("select DairyNo,Status,IMID from DairyCount where DairyNo IN (select Distinct DiaryNo From DiaryEntry where Status='CountDispatch' and ExamSession='" + lblHiddenSeason.Text.ToString() + "')  order by DairyNo desc ", con);
        DataSet        ds1           = new DataSet();

        countDispatch.Fill(ds1);
        if (ds1.Tables[0].ToString() != "")
        {
            GrdCountDispatch.DataSource = ds1;
            GrdCountDispatch.DataBind();
        }
    }