Ejemplo n.º 1
0
        private void printReport()
        {
            DataSet ds1 = new DataSet();

            /*mCheckDoi ==1: Cap moi*/
            if (mCheckDoi == 1)
            {
                #region Mat trong
                if (mIndex == 1)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                    {
                        RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet();
                        ds1 = bidingDataSet_Mattrong();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    case 4:
                    {
                        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 5:
                    {
                        Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 6:
                    {
                        RpInGCN_MatTrong_English rpt = new RpInGCN_MatTrong_English();
                        ds1 = bidingDataSet_Mattrong_English();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    default:
                        break;
                    }
                }

                #endregion
                #region Mat ngoai
                else if (mIndex == 2)
                {
                    /*2017-07-25 - TrieuVH update start*/
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                        RpInGCN_MatNgoai_DacBiet rpt3 = new RpInGCN_MatNgoai_DacBiet();
                        ds1 = bidingDataSet_Matngoai();
                        rpt3.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt3;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;

                    case 4:
                    case 6:
                        Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }
                }
                #endregion
            }
            else
            {
                #region Mat trong
                // In mat trong cua report
                if (mIndex == 1)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                    {
                        RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    case 4:
                    {
                        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 5:
                    {
                        Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                        break;
                    }

                    case 6:
                    {
                        RpInGCN_MatTrong_English rpt = new RpInGCN_MatTrong_English();
                        ds1 = bidingDataSet_Mattrong_English();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }

                    default:
                        break;
                    }
                }
                #endregion
                #region Mat ngoai

                else if (mIndex == 2)
                {
                    switch (mChungChiStatic)
                    {
                    case 1:
                    case 2:
                    case 3:
                        RpInGCN_MatNgoai_DacBiet rpt3 = new RpInGCN_MatNgoai_DacBiet();
                        ds1 = bidingDataSet_Matngoai_Doi();
                        rpt3.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt3;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;

                    case 4:
                    case 6:
                        Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                        break;
                    }
                }
                #endregion
            }
        }
Ejemplo n.º 2
0
        private void printReport()
        {
            DataSet ds1 = new DataSet();

            /*mCheckDoi ==1: Cap moi*/
            if (mCheckDoi == 1)
            {
                #region Mat trong
                if (mIndex == 1)
                {
                    if (mChungChiStatic == 1 || mChungChiStatic == 2)
                    {
                        RpInGCN_MatTrong rpt = new RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 3)
                    {
                        RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet();
                        ds1 = bidingDataSet_Mattrong();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 4)
                    {
                        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 5)
                    {
                        Private_matTrong_Mau2 _rpt = new Private_matTrong_Mau2();
                        ds1 = bidingDataSet_Mattrong();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                    }
                }
                //// In mat trong cua report
                //if (mIndex == 1)
                //{
                //    //
                //    // Check cac chung chi do trung tam cap
                //    if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42)
                //    {
                //        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                //        ds1 = bidingDataSet_Mattrong();
                //        _rpt.SetDataSource(ds1);
                //        InGcnViewer.ReportSource = _rpt;
                //        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                //        InGcnViewer.RefreshReport();
                //    }
                //    else
                //    {
                //        RpInGCN_MatTrong rpt = new RpInGCN_MatTrong();
                //        ds1 = bidingDataSet_Mattrong();
                //        rpt.SetDataSource(ds1);
                //        InGcnViewer.ReportSource = rpt;
                //        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                //        this.InGcnViewer.RefreshReport();
                //    }
                //}
                #endregion
                #region Mat ngoai

                else if (mIndex == 2)
                {
                    if (mChungChiStatic == 1 || mChungChiStatic == 2 || mChungChiStatic == 3)
                    {
                        RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 4)
                    {
                        Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    // DataSet ds1 = new DataSet();
                    //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42)
                    //{
                    //    Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                    //    ds1 = bidingDataSet_Matngoai();
                    //    _rpt.SetDataSource(ds1);
                    //    InGcnViewer.ReportSource = _rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    this.InGcnViewer.RefreshReport();
                    //}
                    //else
                    //{
                    //    RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai();
                    //    ds1 = bidingDataSet_Matngoai();
                    //    rpt.SetDataSource(ds1);
                    //    InGcnViewer.ReportSource = rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    this.InGcnViewer.RefreshReport();

                    //}
                }
                #endregion
            }
            else if (mCheckDoi > 1)
            {
                #region Mat trong

                // In mat trong cua report
                if (mIndex == 1)
                {
                    if (mChungChiStatic == 1 || mChungChiStatic == 2)
                    {
                        RpInGCN_MatTrong rpt = new RpInGCN_MatTrong();
                        //DataSet ds1 = new DataSet();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        rpt.SetDataSource(ds1);
                        //rpt.SetParameterValue("SoQT", mSoQT);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 3)
                    {
                        RpInGCN_MatTrong_DacBiet rpt = new RpInGCN_MatTrong_DacBiet();
                        //DataSet ds1 = new DataSet();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        rpt.SetDataSource(ds1);
                        //rpt.SetParameterValue("SoQT", mSoQT);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 4)
                    {
                        Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                        ds1 = bidingDataSet_Mattrong_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        InGcnViewer.RefreshReport();
                    }
                    ////DataSet ds1 = new DataSet();
                    //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42)
                    //{
                    //    Private_RpInGCN_MatTrong _rpt = new Private_RpInGCN_MatTrong();
                    //    ds1 = bidingDataSet_Mattrong_Doi();
                    //    _rpt.SetDataSource(ds1);
                    //    InGcnViewer.ReportSource = _rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    InGcnViewer.RefreshReport();

                    //}
                    //else
                    //{

                    //    RpInGCN_MatTrong rpt = new RpInGCN_MatTrong();
                    //    //DataSet ds1 = new DataSet();
                    //    ds1 = bidingDataSet_Mattrong_Doi();
                    //    rpt.SetDataSource(ds1);
                    //    //rpt.SetParameterValue("SoQT", mSoQT);
                    //    InGcnViewer.ReportSource = rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    this.InGcnViewer.RefreshReport();
                    //}
                }
                #endregion
                #region Mat ngoai

                else if (mIndex == 2)
                {
                    if (mChungChiStatic == 1 || mChungChiStatic == 2 || mChungChiStatic == 3)
                    {
                        RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai();
                        //DataSet ds1 = new DataSet();
                        ds1 = bidingDataSet_Matngoai_Doi();
                        rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    else if (mChungChiStatic == 4)
                    {
                        Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                        ds1 = bidingDataSet_Matngoai_Doi();
                        _rpt.SetDataSource(ds1);
                        InGcnViewer.ReportSource  = _rpt;
                        InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                        this.InGcnViewer.RefreshReport();
                    }
                    //if (mChungChiId == 31 || mChungChiId == 32 || mChungChiId == 33 || mChungChiId == 34 || mChungChiId == 14 || mChungChiId == 38 || mChungChiId == 39 || mChungChiId == 42)
                    //{

                    //    Private_RpInGCN_MatNgoai _rpt = new Private_RpInGCN_MatNgoai();
                    //    ds1 = bidingDataSet_Matngoai_Doi();
                    //    _rpt.SetDataSource(ds1);
                    //    InGcnViewer.ReportSource = _rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    this.InGcnViewer.RefreshReport();

                    //}
                    //else
                    //{

                    //    RpInGCN_MatNgoai rpt = new RpInGCN_MatNgoai();
                    //    //DataSet ds1 = new DataSet();
                    //    ds1 = bidingDataSet_Matngoai_Doi();
                    //    rpt.SetDataSource(ds1);
                    //    InGcnViewer.ReportSource = rpt;
                    //    InGcnViewer.ToolPanelView = ToolPanelViewType.None;
                    //    this.InGcnViewer.RefreshReport();
                    //}
                }
                #endregion
            }
        }