Exemple #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();
    }
Exemple #2
0
 private void CreateNew()
 {
     if (!checkSave())
     {
         return;
     }
     CurrentTask = new GridProject(CurrentGridConfig, CurrentPrinterConfig);
 }
        private void getProjectData()
        {
            string    status = ViewState["projectStatus"].ToString();
            DataTable dt     = status == "2" ? projBLL.getMyNeedFollowUpProject() : projBLL.getFinishedProject();

            if (dt.Rows.Count > 0)
            {
                ViewState["GridProjData"] = dt;
                GridProject.DataSource    = dt;
                GridProject.DataBind();
            }
        }
        protected void btnQuery_Click(object sender, EventArgs e)
        {
            projectTable entity = new projectTable();

            if (cmbStatus.SelectedIndex > 0)
            {
                entity.projectStatus = Convert.ToInt32(cmbStatus.SelectedValue);
            }
            if (cmbType.SelectedIndex > 0)
            {
                entity.projectType = Convert.ToInt32(cmbType.SelectedValue);
            }
            if (cmbSite.SelectedIndex > 0)
            {
                entity.projectSite = Convert.ToInt32(cmbSite.SelectedValue);
            }
            if (cmbPriority.SelectedIndex > 0)
            {
                entity.priority = Convert.ToInt32(cmbPriority.SelectedValue);
            }
            string startDate = "", endDate = "";

            if (dateStart.SelectedDate.HasValue)
            {
                startDate = dateStart.SelectedDate.Value.ToShortDateString();
            }
            if (dateEnd.SelectedDate.HasValue)
            {
                endDate = dateEnd.SelectedDate.Value.ToShortDateString();
            }
            DataTable dt = projBLL.getDataTableByEntity(entity, startDate, endDate);

            ViewState["GridProjData"] = dt;
            GridProject.DataSource    = dt;
            GridProject.DataBind();
        }