protected void FillCalendarDateDropbox(DateTime kalenderDatum, ComboBox cbCalendarDates)
        {
            string  sqlQuery = (BU == Utility.BU.ILVB ? SQLQueries.SQL_CALENDAR_DATES_ILH : SQLQueries.SQL_CALENDAR_DATES_ILSB).Replace("<period>", Period.ToString());
            DataSet ds       = SqlDA.GetQueryDataSet(Utility.GetConnectionString(this.ENV, this.BU, Period, false), sqlQuery, false);

            cbCalendarDates.DataSource    = ds.Tables[0];
            cbCalendarDates.DisplayMember = "Kalenderdatum";

            // Set selected item
            foreach (DataRowView item in cbCalendarDates.Items)
            {
                if (DateTime.Parse(item[0].ToString()) == kalenderDatum)
                {
                    cbCalendarDates.SelectedItem = item;
                    break;
                }
            }
        }
Beispiel #2
0
        public TroublehsootingForm(Utility.ENV env, Utility.BU bu, Utility.PERIOD period, DateTime kalenderDatum, int ILRunID, Int64 ssisRunID)
        {
            InitializeComponent();

            Init(env, bu, period, ILRunID, ssisRunID, kalenderDatum);

            // Get Failure Details
            string cs = Utility.GetConnectionString(ENV, BU, Period, false);

            DataSet dsFailureDetails = SqlDA.GetQueryDataSet(cs, SQLQueries.SQL_RUN_FAILURES.Replace("<RunID>", ILRunID.ToString()), false);

            dgvFailureDetails.DataSource = dsFailureDetails.Tables[0];
            dgvFailureDetails.Refresh();

            // Get SSIS Errors
            DataSet dsFSSISErrors = SqlDA.GetQueryDataSet(cs, SQLQueries.SQL_SSIS_ERRORS.Replace("<RunID>", SsisRunID.ToString()), false);

            dgvSSISErrors.DataSource = dsFSSISErrors.Tables[0];
            dgvSSISErrors.Refresh();
        }
Beispiel #3
0
        public override void Refresh()
        {
            string cs    = Utility.GetConnectionString(ENV, BU, Period, false);
            string query = SQLQueries.SQL_LATEST_SSIS_MESSAGES.Replace("<RunID>", SsisRunID.ToString());

            //if (_sortAsc == false)
            //    query += " order by LogId desc";
            try
            {
                DataSet dsSSISLog = SqlDA.GetQueryDataSet(cs, query, false);
                dgvSSISLog.DataSource = dsSSISLog.Tables[0];
                dgvSSISLog.Refresh();
                // Show last refresh in toolstripstatuslabel
                toolStripStatusLabel1.Text = "Last Refreshed: " + DateTime.Now.ToString();
            }
            catch (Exception e)
            {
                throw e;
            }
        }
        public override int RefreshData()
        {
            string cs;
            int    rc = 0;

            cs = Utility.GetConnectionString(ENV, BU, Period, false);

            if (cs != "")
            {
                string detailsQuery = (BU == Utility.BU.ILVB ? SQLQueries.SQL_RUN_DETAILS_ILH : SQLQueries.SQL_RUN_DETAILS_ILSB);
                // Replace DAG with MAAND if this is a MAAND process
                if (Period == Utility.PERIOD.MAAND)
                {
                    detailsQuery = detailsQuery.Replace("_DAG", "_MAAND");
                }

                // Replace <kalenderdatum> with real date
                detailsQuery = detailsQuery.Replace("<Kalenderdatum>", CalendarDate.Year + "-" + CalendarDate.Month + "-" + CalendarDate.Day);

                DataSet ds = SqlDA.GetQueryDataSet(cs, detailsQuery, false);

                if (ds.Tables[0].Rows.Count > 0)
                {
                    // Load details list
                    LoadDetailsList(ds.Tables[0]);

                    //lblPeilDatum.Text = Convert.ToDateTime(ds.Tables[0].Rows[0]["PeilDatum"]).ToString("dd-MM-yyyy");

                    //cbLegenStaging.Checked = (ds.Tables[0].Rows[0]["LEGEN_STG"].ToString() == "J");
                    //cbLaadStaging.Checked = (ds.Tables[0].Rows[0]["LAAD_STG"].ToString() == "J");
                    //cbLaadCloseBO.Checked = (ds.Tables[0].Rows[0]["LAAD_CLOSE"].ToString() == "P");
                    //cbVoorbereidenRun.Checked = (ds.Tables[0].Rows[0]["VOORBEREIDEN_RUN"].ToString() == "J");
                    //cbArchiefbestandenZippen.Checked = (ds.Tables[0].Rows[0]["ARCHIEFBESTANDEN_ZIPPEN"].ToString() == "J");
                    //cbLaadHouseFP.Checked = (ds.Tables[0].Rows[0]["LAAD_HOUSE_FP"].ToString() == "P");
                    //cbLaadCBS.Checked = (ds.Tables[0].Rows[0]["LAAD_CBS"].ToString() == "P");
                    //cbLaadCloseCM.Checked = (ds.Tables[0].Rows[0]["LAAD_CLOSE_CM"].ToString() == "P");
                    //cbLaadDaybreak.Checked = (ds.Tables[0].Rows[0]["LAAD_DAYBREAK"].ToString() == "P");
                    //cbLaadHomes.Checked = (ds.Tables[0].Rows[0]["LAAD_HOMES"].ToString() == "J");
                    //cbLaadMidas.Checked = (ds.Tables[0].Rows[0]["LAAD_MIDAS"].ToString() == "P");
                    //cbLaadMidasCK.Checked = (ds.Tables[0].Rows[0]["LAAD_MIDAS_CK"].ToString() == "P");
                    //cbLaadHouse.Checked = (ds.Tables[0].Rows[0]["LAAD_HOUSE"].ToString() == "P");
                    //cbLaadMDS.Checked = (ds.Tables[0].Rows[0]["LAAD_MDS"].ToString() == "J");
                    //cbLaadQuion.Checked = (ds.Tables[0].Rows[0]["LAAD_QUION"].ToString() == "P");
                    //cbLaadSAPAchterstandPolisData.Checked = (ds.Tables[0].Rows[0]["LAAD_SAPBW_ACHTERSTAND_POLISDATA"].ToString() == "P");
                    //cbLaadSAPKlantData.Checked = (ds.Tables[0].Rows[0]["LAAD_SAPBW_KLANTDATA"].ToString() == "P");
                    //cbLaadSAPPolisData.Checked = (ds.Tables[0].Rows[0]["LAAD_SAPBW_POLISDATA"].ToString() == "P");
                    //cbLaadSAPICM.Checked = (ds.Tables[0].Rows[0]["LAAD_SAP_ICM"].ToString() == "P");
                    //cbLaadDDS.Checked = (ds.Tables[0].Rows[0]["LAAD_DDS"].ToString() == "P");
                    //cbLaadDDSDWH.Checked = (ds.Tables[0].Rows[0]["LAAD_DDS_DWH"].ToString() == "P");
                    //cbMaakCF.Checked = (ds.Tables[0].Rows[0]["MAAK_CF"].ToString() == "J");

                    //dtpClosePeilDatum.Text = ds.Tables[0].Rows[0]["CLOSE_Peildatum"].ToString();
                    //dtpCloseCMPeilDatum.Text = ds.Tables[0].Rows[0]["CLOSE_CM_Peildatum"].ToString();
                    //dtpDaybreakPeilDatum.Text = ds.Tables[0].Rows[0]["DAYBREAK_Verwacht_Peildatum"].ToString();
                    //dtpHomesPeilDatum.Text = ds.Tables[0].Rows[0]["HOMES_Peildatum"].ToString();
                    //dtpMidasPeilDatum.Text = ds.Tables[0].Rows[0]["MIDAS_Peildatum"].ToString();
                    //dtpMidasCKPeilDatum.Text = ds.Tables[0].Rows[0]["MIDAS_CK_Verwacht_Peildatum"].ToString();
                    //dtpHousePeilDatum.Text = ds.Tables[0].Rows[0]["HOUSE_Peildatum"].ToString();
                    //dtpQuionPeilDatum.Text = ds.Tables[0].Rows[0]["QUION_Peildatum"].ToString();
                    //dtpSAPAchterstandPeilDatum.Text = ds.Tables[0].Rows[0]["SAPBW_Achterstand_PolisData_Peildatum"].ToString();
                    //dtpSAPKlantPeilDatum.Text = ds.Tables[0].Rows[0]["SAPBW_KlantData_Peildatum"].ToString();
                    //dtpSAPPolisPeilDatum.Text = ds.Tables[0].Rows[0]["SAPBW_PolisData_Peildatum"].ToString();
                    //dtpSAPICMPeilDatum.Text = ds.Tables[0].Rows[0]["SAP_ICM_Verwacht_Peildatum"].ToString();

                    //lblCFDistributieLijst.Text = ds.Tables[0].Rows[0]["CFDistributielijst"].ToString();
                    //lblSoortRun.Text = ds.Tables[0].Rows[0]["SoortRun"].ToString();

                    //cbLaadDDS.Checked = (ds.Tables[0].Rows[0]["LAAD_DDS"].ToString() == "J");
                    //cbLaadDDSDWH.Checked = (ds.Tables[0].Rows[0]["LAAD_DDS_DWH"].ToString() == "J");
                }
            }
            else
            {
                rc = -1;
            }
            return(rc);
        }