public static XtraReport CreateGRNFPrintout(int receiptConfirmationPrintoutID)
        {
            BLL.ReceiptConfirmationPrintout receiptPrintout = new BLL.ReceiptConfirmationPrintout();
            receiptPrintout.LoadByPrimaryKey(receiptConfirmationPrintoutID);

            FiscalYear fiscalYear = new FiscalYear();

            fiscalYear.LoadByPrimaryKey(receiptPrintout.FiscalYearID);

            return(CreateGRNFPrintout(receiptPrintout.ReceiptID, receiptPrintout.IDPrinted, true, fiscalYear));
        }
        /// <summary>
        /// Only for the exporting of Receipt Printouts (GRV, iGRV, SRM, Delivery Note)
        /// </summary>
        /// <param name="receiptConfirmationPrintoutID"></param>
        /// <returns></returns>

        public static XtraReport CreateReceiptPrintout(string printedBy, int receiptConfirmationPrintoutID)
        {
            BLL.ReceiptConfirmationPrintout rcp = new BLL.ReceiptConfirmationPrintout();
            rcp.LoadByPrimaryKey(receiptConfirmationPrintoutID);
            FiscalYear fiscalYear = new FiscalYear();

            fiscalYear.LoadByPrimaryKey(rcp.FiscalYearID);
            if (rcp.RowCount > 0 && !rcp.IsColumnNull("ReceiptID"))
            {
                return(PrintReceiptConfirmation(printedBy, rcp.ReceiptID, rcp.ID, true, fiscalYear));
            }
            return(null);
        }
        private void lkAccount_EditValueChanged(object sender, EventArgs e)
        {
            var ed = new EthiopianDate.EthiopianDate();

            if (lkFiscalYear.EditValue != null && lkAccount.EditValue != null)
            {
                FiscalYear fYear = new FiscalYear();
                fYear.LoadByPrimaryKey(Convert.ToInt32(lkFiscalYear.EditValue));
                //TODO: this has to be re-implemented.
                cutOffNumberReport                = new CutOffNumberReport(CurrentContext.LoggedInUserName);
                cutOffNumberReport.DataSource     = ReceiveDoc.GetCutOffNumber(Convert.ToInt32(lkFiscalYear.EditValue), Convert.ToInt32(lkAccount.EditValue));
                cutOffNumberReport.xrMonth.Text   = string.Format("{0}", ed.GetMonthName());
                cutOffNumberReport.xrAccount.Text = string.Format("{0}", lkAccount.Text);
                cutOffNumberReport.xrYear.Text    = string.Format("{0}", fYear.Name);
                printControl1.PrintingSystem      = cutOffNumberReport.PrintingSystem;
                cutOffNumberReport.CreateDocument();
            }
        }