示例#1
0
        private void wizard1_NextButtonClick(object sender, CancelEventArgs e)
        {
            if (this.wizard1.SelectedPageIndex == 1)
            {
                ComboItem cboFileProduceType = this.cboFilesProduced.SelectedItem as ComboItem;
                ComboItem cboFileDelimiter   = this.cboFileDelimiter.SelectedItem as ComboItem;

                DTO_FileHdr dTO_FileHdr = new DTO_FileHdr()
                {
                    FileProduceTypeId  = cboFileProduceType.Text.ToUpper(),
                    FileDelimiterId    = cboFileDelimiter.Text.ToUpper(),
                    ActivityName       = "Export CBA Test to Fred",
                    HeaderFields       = Convert.ToInt32(this.nUpHeaderFields.Value),
                    TaxFields          = Convert.ToInt32(this.nUpTaxFields.Value),
                    PostingFields      = Convert.ToInt32(this.nUpPostingFields.Value),
                    ClearingFields     = Convert.ToInt32(this.nUpClearingFields.Value),
                    InterCompanyFields = Convert.ToInt32(this.nUpICClearingFields.Value)
                };

                dTO_FileHdr.AddToFileDtlList(dTO_FileHdr);

                dtoFileHdrList.Add(dTO_FileHdr);

                this.superGridControl1.PrimaryGrid.DataSource = dtoFileHdrList;
            }
            else if (this.wizard1.SelectedPageIndex == 2)
            {
            }
        }
示例#2
0
        private void wizardPage4_NextButtonClick(object sender, CancelEventArgs e)
        {
            DTO_FileHdr dTO_FileHdr = new DTO_FileHdr()
            {
                FileProduceTypeId  = this.cboFileDelimiter.SelectedText,
                ActivityName       = txtActivityName.Text,
                HeaderFields       = Convert.ToInt32(this.nUpHeaderFields.Value),
                TaxFields          = Convert.ToInt32(this.nUpTaxFields.Value),
                ClearingFields     = Convert.ToInt32(this.nUpClearingFields.Value),
                InterCompanyFields = Convert.ToInt32(this.nUpICClearingFields.Value)
            };

            dtoFileHdrList.Add(dTO_FileHdr);

            this.superGridControl1.PrimaryGrid.DataSource = dtoFileHdrList;
        }
示例#3
0
        public DataValidatorReturn AddToFileDtlList(DTO_FileHdr dTO_FileHdr)
        {
            if (dTO_FileHdr.HeaderFields > 0)
            {
                for (int i = 1; i <= dTO_FileHdr.HeaderFields; i++)
                {
                    DTO_FileDtl dtl = new DTO_FileDtl()
                    {
                        FieldType = "HEADER",
                        FieldNo   = i
                    };

                    dTO_FileHdr.DtoFileDtlList.Add(dtl);
                }
            }

            if (dTO_FileHdr.PostingFields > 0)
            {
                for (int i = 1; i <= dTO_FileHdr.PostingFields; i++)
                {
                    DTO_FileDtl dtl = new DTO_FileDtl()
                    {
                        FieldType = "POSTING",
                        FieldNo   = i
                    };

                    dTO_FileHdr.DtoFileDtlList.Add(dtl);
                }
            }

            if (dTO_FileHdr.ClearingFields > 0)
            {
                for (int i = 1; i <= dTO_FileHdr.ClearingFields; i++)
                {
                    DTO_FileDtl dtl = new DTO_FileDtl()
                    {
                        FieldType = "CLEARING",
                        FieldNo   = i
                    };

                    dTO_FileHdr.DtoFileDtlList.Add(dtl);
                }
            }

            if (dTO_FileHdr.InterCompanyFields > 0)
            {
                for (int i = 1; i <= dTO_FileHdr.InterCompanyFields; i++)
                {
                    DTO_FileDtl dtl = new DTO_FileDtl()
                    {
                        FieldType = "ICLEARING",
                        FieldNo   = i
                    };

                    dTO_FileHdr.DtoFileDtlList.Add(dtl);
                }
            }

            if (dTO_FileHdr.TaxFields > 0)
            {
                for (int i = 1; i <= dTO_FileHdr.TaxFields; i++)
                {
                    DTO_FileDtl dtl = new DTO_FileDtl()
                    {
                        FieldType = "TAX",
                        FieldNo   = i
                    };

                    dTO_FileHdr.DtoFileDtlList.Add(dtl);
                }
            }

            return(new DataValidatorReturn());
        }