Ejemplo n.º 1
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);
        }
Ejemplo n.º 2
0
        //**************************************************************************
        ///    <Description>
        ///       This method checks business rule and call Delete() method of DS class
        ///    </Description>
        ///    <Inputs>
        ///        pintID
        ///    </Inputs>
        ///    <Outputs>
        ///     Delete a record  from Database
        ///    </Outputs>
        ///    <Returns>
        ///       void
        ///    </Returns>
        ///    <Authors>
        ///       DungLA
        ///    </Authors>
        ///    <History>
        ///    3-Jan-2005
        ///    </History>
        ///    <Notes>
        ///    </Notes>
        //**************************************************************************

        public void Delete(string pstrID)
        {
            sys_ReportDS dsReport = new sys_ReportDS();

            dsReport.Delete(pstrID);
        }