예제 #1
0
        ///<summary>    Inserts an imorted report described by pstrPath. </summary>
        ///<remarks>    Amartinez, 22/05/2017. </remarks>
        ///<param name="pstrPath">  Full pathname of the pstr file. </param>

        public static void InsertImportedReport(string pstrPath)
        {
            ImportedReportService lObjImortedReportService = new ImportedReportService();
            ImportedReport        lObjImportedReport       = new ImportedReport();

            lObjImportedReport.FileName = Path.GetFileName(pstrPath);
            lObjImportedReport.Date     = DateTime.Now;
            int lIntErrorCode = lObjImortedReportService.Add(lObjImportedReport);

            if (lIntErrorCode != 0)
            {
                Console.WriteLine(DIApplication.Company.GetLastErrorDescription());
                LogUtility.Write(DIApplication.Company.GetLastErrorDescription() + "ImportedReport  En archivo: " + Path.GetFileName(pstrPath));
            }
        }
예제 #2
0
        ///<summary>    Inserts an imorted report described by pstrPath. </summary>
        ///<remarks>    Amartinez, 22/05/2017. </remarks>
        ///<param name="pStrPath">  Full pathname of the pstr file. </param>

        public static bool InsertImportedReport(string pStrPath)
        {
            try
            {
                ImportedReportService lObjImortedReportService = new ImportedReportService();
                ImportedReport        lObjImportedReport       = new ImportedReport();

                lObjImportedReport.FileName = Path.GetFileName(pStrPath);
                lObjImportedReport.Date     = DateTime.Now;
                int lIntErrorCode = lObjImortedReportService.Add(lObjImportedReport);
                if (lIntErrorCode != 0)
                {
                    Console.WriteLine(DIApplication.Company.GetLastErrorDescription());
                    LogUtility.Write(DIApplication.Company.GetLastErrorDescription() + "ImportedReport  En archivo: " + Path.GetFileName(pStrPath));
                }
            }
            catch (Exception ex)
            {
                LogUtility.Write("Archivo: " + Path.GetFileName(pStrPath) + " Guardado correctamente");
                return(false);
            }
            return(true);
        }
예제 #3
0
        /// <summary> Updates the given pObjRecord. </summary>
        /// <remarks> Ranaya, 08/05/2017. </remarks>
        /// <param name="pObjRecord"> The Object record to add. </param>
        /// <returns> An int. </returns>

        public int Update(ImportedReport pObjRecord)
        {
            return(mObjImportedReportDAO.Update(pObjRecord));
        }
예제 #4
0
        /// <summary> Adds pObjRecord. </summary>
        /// <remarks> Ranaya, 08/05/2017. </remarks>
        /// <param name="pObjRecord"> The Object record to add. </param>
        /// <returns> An int. </returns>

        public int Add(ImportedReport pObjRecord)
        {
            return(mObjImportedReportDAO.Add(pObjRecord));
        }