예제 #1
0
        private void ShowCreditNoteReport(int id)
        {
            var creditNoteDataSet = new CreditNoteDataSet();
            var firmTable         = creditNoteDataSet.Tables["FirmMaster"];
            var otherInfo         = creditNoteDataSet.Tables["OtherInfo"];

            _dataSetProvider.GetFirmDataTable(firmTable);
            var crn      = _transactionService.GetCreditNotes().Single(x => x.Id == id);
            var customer = (Customer)cboCustomer.SelectedItem;

            var otherRow = otherInfo.NewRow();

            otherRow["InvoiceNo"]       = crn.InvoiceNo;
            otherRow["TransactionDate"] = crn.TransactionDate;
            otherRow["ContactName"]     = customer.ContactName;
            otherRow["ContactNo"]       = customer.Address.Phone;
            otherRow["Address"]         = customer.Address.ToString();
            otherRow["Particulars"]     = crn.Description;
            otherRow["TotalAmount"]     = crn.Amount;
            otherRow["VATNumber"]       = customer.VATNumber;
            otherRow["CSTNumber"]       = customer.CSTNumber;
            otherRow["AmountInWords"]   = SpellNumber.SpellInWord(crn.Amount);

            otherInfo.Rows.Add(otherRow);

            var orderReport = new frmReport
            {
                ReportPath    = ReportUtility.ResolveReportPath(ReportConstants.CreditNoteReport),
                ReportDataSet = creditNoteDataSet
            };

            orderReport.Show();
        }
예제 #2
0
        public void TestMethod1()
        {
            //Arrange
            int testData = 1234;

            //Act
            string spell = SpellNumber.GetSpell(testData);

            //Assert
            Assert.IsNotNull(spell);
        }
예제 #3
0
        public void TestMethod2()
        {
            //Arrange
            int testData = 1234;

            //Act
            string spell = SpellNumber.GetSpell(testData);

            //Assert
            Assert.AreEqual("one thousand two hundred thirty four", spell);
        }
 public SpellNumberTest()
 {
     spellNumber = new SpellNumber();
 }