Beispiel #1
0
        // 内訳データ読込GridView表示
        private bool loadPlanningContData(DataGridView dgv)
        {
            dgv.Rows.Clear();
            dgv.Rows.Add(iniRCnt);
            EstPlanOp epo = new EstPlanOp();

            if (plnd[idx].PlanningID > 0)
            {
                DataTable dt = epo.PlanningCont_Select(plnd[idx].PlanningID);
                if (dt == null)
                {
                    return(false);
                }
                if (dt.Rows.Count > iniRCnt)
                {
                    dgv.Rows.Add(dt.Rows.Count - iniRCnt);
                }
                if (!viewPlanningContToDgv(dt, dgv))
                {
                    return(false);
                }
            }
            buttonNumbering();
            reCalculateAll(dgv);
            return(true);
        }
Beispiel #2
0
        private void loadPlanningData(DataGridView dgv)
        {
            EstPlanOp epo = new EstPlanOp();
            DataTable dt;

            if ((dt = epo.Planning_Select_Latest(ted.TaskEntryID)) == null)
            {
                return;
            }
            plnd = new PlanningData(dt.Rows[dt.Rows.Count - 1]);

            string condition = "Cost1 > 0";

            if ((dt = epo.PlanningCont_Select(plnd.PlanningID, condition)) == null)
            {
                return;
            }

            dgv.Rows.Clear();
            dgv.Rows.Add(iniRCnt);

            if (dt.Rows.Count > iniRCnt)
            {
                dgv.Rows.Add(dt.Rows.Count - iniRCnt);
            }
            if (!viewOutsourceContToDgv(dt, dgv))
            {
                return;
            }

            reCalculateAll(dgv);                                                   // 再計算

            osd                = new OutsourceData[1];
            osd[0]             = new OutsourceData();
            osd[0].TaskEntryID = plnd.TaskEntryID;
            osd[0].PlanningID  = plnd.PlanningID;
            osd[0].OfficeCode  = plnd.OfficeCode;
            osd[0].Department  = plnd.Department;
            osd[0].Publisher   = plnd.OfficeCode + plnd.Department;

            plnd = new PlanningData();          // 使用済み初期化
            return;
        }