Пример #1
0
        private void initialSetbuttonFromPlan()
        {
            EstPlanOp epo = new EstPlanOp();
            DataTable dt;

            if ((dt = epo.Planning_Select_Latest(ted.TaskEntryID)) == null)
            {
                buttonFromPlan.Enabled = false;
            }
            else
            {
                buttonFromPlan.Enabled = true;
            }
        }
Пример #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;
        }