Exemplo n.º 1
0
        private TestRankRow CreateRankRow(int index, string name,
                                          double lower1, double upper1, double lower2, double upper2)
        {
            TestRankRow row = new TestRankRow();

            row.Index  = index;
            row.Name   = $"{name}-{index}";
            row.Lower1 = lower1;
            row.Upper1 = upper1;
            row.Lower2 = lower2;
            row.Upper2 = upper2;

            return(row);
        }
Exemplo n.º 2
0
        private void SetEditValueFromDataSet()
        {
            if (rankSet.Empty == true)
            {
                itemCodeCombo.SelectedIndex = 0;
                nameEdit.Text = "";
                memoEdit.Text = "";
            }
            else
            {
                itemCodeCombo.SelectedValue = rankSet.ItemCode;
                nameEdit.Text = rankSet.Name;
                memoEdit.Text = rankSet.Memo;
            }

            rankRows.Clear();
            rankRowSet.Select(rankSet.RecNo);

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

                TestRankRow row = new TestRankRow();
                row.Index  = rankRowSet.Index;
                row.Name   = rankRowSet.Name;
                row.Lower1 = rankRowSet.Lower1;
                row.Upper1 = rankRowSet.Upper1;
                row.Lower2 = rankRowSet.Lower2;
                row.Upper2 = rankRowSet.Upper2;

                rankRows.Add(row);
            }

            rankRowGrid.DataSource = (rankRows.Count == 0) ? null : rankRows;
            SetRankRowColumnVisible((EReportItemCode)itemCodeCombo.SelectedValue);

            RefreshRankRowData();
        }