Exemple #1
0
        public void DeleteHistoryPara(object pobjHistory)
        {
            sys_ReportHistoryVO     voReportHistory     = (sys_ReportHistoryVO)pobjHistory;
            sys_ReportHistoryParaDS dsReportHistoryPara = new sys_ReportHistoryParaDS();

            dsReportHistoryPara.Delete(voReportHistory.HistoryID);
        }
Exemple #2
0
        //**************************************************************************
        ///    <Description>
        ///       This method not implements yet
        ///    </Description>
        ///    <Inputs>
        ///
        ///    </Inputs>
        ///    <Outputs>
        ///
        ///    </Outputs>
        ///    <Returns>
        ///
        ///    </Returns>
        ///    <Authors>
        ///       DungLA
        ///    </Authors>
        ///    <History>
        ///		Created: 28-Dec-2004
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************

        public void Delete(object pObjectVO)
        {
            sys_ReportVO voReport = (sys_ReportVO)pObjectVO;

            sys_ReportAndGroupDS dsReportAndGroup = new sys_ReportAndGroupDS();

            // delete data in sys_ReportAndGroup
            dsReportAndGroup.DeleteByReportID(voReport.ReportID);

            // delete data in sys_ReportDrillDown where master id is selected report id
            sys_ReportDrillDownDS dsDrillDown = new sys_ReportDrillDownDS();

            dsDrillDown.Delete(voReport.ReportID);

            // delete data in sys_ReportFields
            sys_ReportFieldsDS dsReportFields = new sys_ReportFieldsDS();

            dsReportFields.Delete(voReport.ReportID);

            // delete data in sys_ReportPara
            sys_ReportParaDS dsReportPara = new sys_ReportParaDS();

            dsReportPara.Delete(voReport.ReportID);

            // retrieve history of this report
            sys_ReportHistoryVO     voReportHistory = new sys_ReportHistoryVO();
            sys_ReportHistoryDS     dsReportHistory = new sys_ReportHistoryDS();
            sys_ReportHistoryParaDS dsHistoryPara   = new sys_ReportHistoryParaDS();
            ArrayList arrHistory = new ArrayList();

            arrHistory = dsReportHistory.ListByReport(voReport.ReportID);
            // delete all data in sys_ReportHistoryPara related to each history
            if (arrHistory.Count > 0)
            {
                for (int i = 0; i < arrHistory.Count - 1; i++)
                {
                    voReportHistory = (sys_ReportHistoryVO)arrHistory[i];
                    dsHistoryPara.Delete(voReportHistory.HistoryID);
                }
            }
            // delete data in sys_ReportHistory
            dsReportHistory.DeleteByReportID(voReport.ReportID);

            // delete data in sys_Report
            sys_ReportDS dsReport = new sys_ReportDS();

            dsReport.Delete(voReport.ReportID);
        }
Exemple #3
0
        //**************************************************************************
        ///    <Description>
        ///       Get HistoryPara value
        ///    </Description>
        ///    <Inputs>
        ///
        ///    </Inputs>
        ///    <Outputs>
        ///
        ///    </Outputs>
        ///    <Returns>
        ///
        ///    </Returns>
        ///    <Authors>
        ///       DungLA
        ///    </Authors>
        ///    <History>
        ///       20-Jan-2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************

        public ArrayList GetHistoryPara(string pstrHistoryID)
        {
            try
            {
                sys_ReportHistoryParaDS dsHistoryPara = new sys_ReportHistoryParaDS();
                return(dsHistoryPara.ListByHistory(pstrHistoryID));
            }
            catch (PCSException ex)
            {
                throw ex.CauseException;
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
Exemple #4
0
        public void DeleteHistory(object pobjHistory)
        {
            sys_ReportHistoryVO     voReportHistory     = (sys_ReportHistoryVO)pobjHistory;
            sys_ReportHistoryDS     dsReportHistory     = new sys_ReportHistoryDS();
            sys_ReportHistoryParaDS dsReportHistoryPara = new sys_ReportHistoryParaDS();

            // delete history param first
            dsReportHistoryPara.Delete(voReportHistory.HistoryID);
            // delete history object
            dsReportHistory.Delete(voReportHistory.HistoryID);
            // drop history table from databas

            try
            {
                dsReportHistory.DropHistoryTables(voReportHistory.HistoryID);
            }
            catch
            {
                dsReportHistory.DropHistoryTables(voReportHistory.TableName);
            }
        }
Exemple #5
0
        public void AddHistoryPara(object pobjHistoryParaVO)
        {
            sys_ReportHistoryParaDS dsHistoryPara = new sys_ReportHistoryParaDS();

            dsHistoryPara.Add(pobjHistoryParaVO);
        }