コード例 #1
0
        public BCCReportScheduler()
        {
            dataAccess = new BCCDataAccess();

            // Get current (Pacific Time Zone)
            // Get UTC time for PST(Pacific Time Zone)
            dtCurrent = DateTime.UtcNow.AddHours(-8);
            // Get TZI for PST from registry
            String pstRegLoc = "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Time Zones\\Pacific Standard Time";
            REG_TZI pstTzi = readRegTZI(pstRegLoc);

            // Create DayLight Start and End Time
            DateTime dlStartDate = new DateTime(DateTime.Now.Year, pstTzi.daylightDate.month, pstTzi.daylightDate.day, pstTzi.daylightDate.hour, pstTzi.daylightDate.minute, pstTzi.daylightDate.second);
            DateTime dlEndDate = new DateTime(DateTime.Now.Year, pstTzi.standardDate.month, pstTzi.standardDate.day, pstTzi.standardDate.hour, pstTzi.standardDate.minute, pstTzi.standardDate.second);
            if (dtCurrent.CompareTo(dlStartDate) > 0 && dtCurrent.CompareTo(dlEndDate) < 0)
            {
               dtCurrent = dtCurrent.AddHours(1);
            }
        }
コード例 #2
0
    private void PopulateGridOrchestration()
    {
        try
        {
            StringCollection applicationList = null;
            DataTable dt = null;
            BCCDataAccess dataAccess = new BCCDataAccess();

            // Check whether the Profile is active and then proceed.
            if (Profile.ControlCenterProfile.IsProfileActive)
            {
                try
                {
                    BCCModuleProperty props = Profile.ControlCenterProfile.ModuleFilter[SiteMap.CurrentNode.Description];
                    applicationList = props.ModuleDictionary[BCCUIHelper.Constants.APP_LIST_KEY];
                }
                catch
                {
                    // Ignore errors from Profile system
                }
            }

            if (applicationList != null && applicationList.Count > 0)
            {
                dt = dataAccess.RetrieveAllOrchestrations(applicationList);

                // This is for the datalist view on the right side.
                dlAppList.DataSource = applicationList;
                dlAppList.DataBind();
                dlAppList.Visible = true;
            }
            else
            {
                dt = dataAccess.RetrieveAllOrchestrations();
            }

            if (dt.Rows.Count > 0)
            {
                dt.DefaultView.Sort = "AssemblyName" + " ASC";
            }
            else
            {
                DataRow blankRow = dt.NewRow();
                dt.Rows.Add(blankRow);
            }

            gridOdx.DataSource = dt;
            gridOdx.DataBind();
            gridOdx.Visible = true;
        }
        catch (Exception ex)
        {
            DisplayError(ex.Message);
        }
    }
コード例 #3
0
 public BCCOperator()
 {
     dataAccess = new BCCDataAccess();
 }