Ejemplo n.º 1
0
        public DataSet LoadIVR010_InventorySheet(ReportCriteriaDTO.IVR010 argCriteria)
        {
            DataSet dsReturn = null;

            ReportDAO dao = new ReportDAO(CommonLib.Common.CurrentDatabase);

            dsReturn = dao.LoadIVR010_InventorySheet(argCriteria);

            return(dsReturn);
        }
Ejemplo n.º 2
0
        public DataSet LoadIVR010_InventorySheet(ReportCriteriaDTO.IVR010 argCriteria)
        {
            DataSet dsReturn = null;

            Database db = m_db;

            DataRequest req = new DataRequest();

            req.CommandText = "S_IVR010_InventorySheet";
            req.CommandType = CommandType.StoredProcedure;
            req.Timeout     = 180;

            req.Parameters.Add("@YearMonth", argCriteria.YearMonth);

            dsReturn = m_db.ExecuteDataSet(req);

            return(dsReturn);
        }
Ejemplo n.º 3
0
        private void ExportOnHandForAccounting()
        {
            string strFileName = GenerateFileName("IVR010");

            string strTemplateFileName = @"Report\IVR010_InventorySheet.xls";
            string strTemplatePath     = Path.Combine(Application.StartupPath, strTemplateFileName);

            string strExportPath = SaveDialogUtil.GetBrowseFileDialogForExport(strFileName);

            if (!"".Equals(strExportPath))
            {
                ReportBIZ bizReport = new ReportBIZ();
                ReportCriteriaDTO.IVR010 objCriteria = new ReportCriteriaDTO.IVR010();

                if (this.dtPeriodBegin.Value.HasValue)
                {
                    objCriteria.YearMonth = this.dtPeriodBegin.Value.Value.ToString("yyyyMM");
                }
                else
                {
                    objCriteria.YearMonth = DateTime.Today.ToString("yyyyMM");
                }


                DataSet dsIVR010 = bizReport.LoadIVR010_InventorySheet(objCriteria);

                ExportUtil.Export(dsIVR010, strTemplatePath, strExportPath);


                MessageDialog.ShowInformation(this, null, new EVOFramework.Message(Messages.eInformation.INF9003.ToString()).MessageDescription);


                if (File.Exists(strExportPath))
                {
                    System.Diagnostics.Process.Start(strExportPath);
                }
            }
        }