コード例 #1
0
 private void SetReportWorkGridRow(ReportWorkRow row, ReportWorkDataSet set)
 {
     row.Index    = set.Index;
     row.ItemCode = set.ItemCode;
     row.ItemName = set.ItemName;
     row.ItemRef  = set.ItemRef;
     row.BiasCH   = set.BiasCH;
     row.Rank     = set.Rank;
     row.Lower    = set.Lower;
     row.Upper    = set.Upper;
 }
コード例 #2
0
        public void AddRow()
        {
            if (Rows.Count >= 500)
            {
                MessageBox.Show("Report Work cannot be added any more because it is not over 500!",
                                AppRes.Caption, MessageBoxButtons.OK, MessageBoxIcon.Error);
                return;
            }

            ReportWorkRow row = new ReportWorkRow();

            if (Rows.Count == 0)
            {
                row.Index     = 1;
                row.ItemName += $"-{row.Index}";
                Rows.Add(row);
                RecordIndex = 0;
            }
            else
            {
                if (RecordIndex < Rows.Count - 1)
                {
                    row.ItemName += $"-{RecordIndex + 2}";
                    Rows.Insert(RecordIndex + 1, row);
                }
                else
                {
                    row.ItemName += $"-{RecordIndex + 1}";
                    Rows.Add(row);
                    RecordIndex++;
                }

                ReorderIndex();
            }

            RefreshGridData();
        }
コード例 #3
0
        private void SetReportWorkDataSet(FbTransaction trans, ReportWorkDataSet set, ReportWorkRow row)
        {
            set.RecNo    = AppRes.DB.GetGenNo("GN_REPORTWORK");
            set.RecipeNo = recipeNo;
            set.Index    = row.Index;
            set.ItemCode = row.ItemCode;
            set.ItemName = row.ItemName;
            set.ItemRef  = row.ItemRef;
            set.BiasCH   = row.BiasCH;
            set.Rank     = row.Rank;
            set.Lower    = row.Lower;
            set.Upper    = row.Upper;

            set.Insert(trans);
        }