Beispiel #1
0
        private void Load(Int64 recipeNo)
        {
            reportSet.Select(recipeNo);
            Count = reportSet.RowCount;

            for (int i = 0; i < reportSet.RowCount; i++)
            {
                reportSet.Fetch(i);

                ReportWorkObject item = new ReportWorkObject();
                item.RecNo    = reportSet.RecNo;
                item.RecipeNo = reportSet.RecipeNo;
                item.Index    = reportSet.Index;
                item.ItemCode = reportSet.ItemCode;
                item.ItemName = reportSet.ItemName;
                item.ItemRef  = reportSet.ItemRef;
                item.BiasCH   = reportSet.BiasCH;
                item.Rank     = reportSet.Rank;
                item.Lower    = reportSet.Lower;
                item.Upper    = reportSet.Upper;

                indexes.Add(item.Index, item);
                names.Add(item.ItemName, item);
            }
        }
        private void workGridView_FocusedRowChanged(object sender, FocusedRowChangedEventArgs e)
        {
            if (workGridView.FocusedRowHandle < 0)
            {
                rankGrid.DataSource = null;
                return;
            }

            DataRow row = workGridView.GetDataRow(workGridView.FocusedRowHandle);

            workSet.Fetch(row);

            Int64           rankNo = AppHelper.ExtractRecNo(workSet.Rank);
            EReportItemCode code   = workSet.ItemCode;

            if (rankNo < 1)
            {
                rankGrid.DataSource = null;
                return;
            }

            rankRowSet.Select(rankNo);
            rankGrid.DataSource = (rankRowSet.Empty == true) ? null : rankRowSet.DataSet.Tables[0];
            rankGridView.ClearSelection();
            AppHelper.RefreshGridData(rankGridView);

            SetRankRowColumnVisible(code);
        }
        private void SetEditValueFromDataSet()
        {
            string smuString = GetSmuString();

            CtrlTestWorkGrid testGrid = testProcPanel.Controls[0] as CtrlTestWorkGrid;

            testGrid.RecipeNo  = recipeNo;
            testGrid.SmuString = smuString;
            testGrid.Rows.Clear();

            testWorkSet.Select(recipeNo);

            if (testWorkSet.Empty == true)
            {
                testGrid.AddRow();
            }
            else
            {
                for (int i = 0; i < testWorkSet.RowCount; i++)
                {
                    testWorkSet.Fetch(i);
                    testGrid.AddRow();
                    SetTestWorkGridRow(testGrid.Rows[i], testWorkSet);
                }
            }

            testGrid.RefreshGridData();

            CtrlReportWorkGrid reportGrid = reportProcPanel.Controls[0] as CtrlReportWorkGrid;

            reportGrid.RecipeNo  = recipeNo;
            reportGrid.SmuString = smuString;
            reportGrid.Rows.Clear();

            reportWorkSet.Select(recipeNo);

            if (reportWorkSet.Empty == true)
            {
                reportGrid.AddRow();
            }
            else
            {
                for (int i = 0; i < reportWorkSet.RowCount; i++)
                {
                    reportWorkSet.Fetch(i);
                    reportGrid.AddRow();
                    SetReportWorkGridRow(reportGrid.Rows[i], reportWorkSet);
                }
            }

            reportGrid.RefreshGridData();
        }