Example #1
0
        private void restructPlanningData()
        {
            PlanningData plndTemp = new PlanningData();

            plndTemp  = ( PlanningData )plnd[idx].Clone();      // 基データを一時退避
            idxBackup = idx;
            if (endPoint == 0)
            {
                idx = 1;
            }
            if (endPoint == 1)
            {
                idx = 2;
            }
            if (endPoint > 1)
            {
                if (idx > 0)
                {
                    plnd[1] = ( PlanningData )plnd[2].Clone();
                }
                idx = 2;
            }

            plnd[idx]            = ( PlanningData )plndTemp.Clone();
            plnd[idx].PlanningID = -1;

            labelTitle.Text  = labelArray[idx];
            buttonPrint.Text = labelArray[idx] + "印刷";
        }
Example #2
0
        private bool dataCollection(string officeCode, string department)
        {
            string        para = " WHERE OfficeCode = '" + officeCode + "' AND Department = '" + department + "'";
            TaskEntryData ted  = new TaskEntryData();

            tedA = ted.SelectTaskEntryData(para);
            if (tedA == null)
            {
                return(false);
            }

            PlanningData[] wkPdA = new PlanningData[tedA.Length];
            PlanningData   pd    = new PlanningData();
            int            j     = 0;

            for (int i = 0; i < tedA.Length; i++)
            {
                pd = pd.LatestPlanningData(tedA[i].TaskEntryID);
                if (pd == null)
                {
                    continue;
                }
                if (pd.ApPresidentStat == 0)
                {
                    wkPdA[j]          = new PlanningData();
                    wkPdA[j]          = ( PlanningData )pd.Clone();
                    wkPdA[j].TaskCode = tedA[i].TaskCode;
                    wkPdA[j].TaskName = tedA[i].TaskName;
                    j++;
                }
            }

            if (j == 0)
            {
                return(false);
            }

            pdA = new PlanningData[j];
            for (int i = 0; i < pdA.Length; i++)
            {
                pdA[i]          = new PlanningData();
                pdA[i]          = ( PlanningData )wkPdA[i].Clone();
                pdA[i].TaskCode = wkPdA[i].TaskCode;
                pdA[i].TaskName = wkPdA[i].TaskName;
            }
            return(true);
        }