示例#1
0
        private void Data_Bind()
        {
            DataTable DT = new DBLog().GetBakDateList();

            this.BakDateLab += "<select id='BakDateList' name='BakDateList' onchange=\"javascript:SelBakDate()\"><option value='-1'>---请选择备份时间---</option>";
            if (DT != null && DT.Rows.Count > 0)
            {
                DateTime[] TimeArray = null;
                List <int> TimeList  = new List <int>();

                foreach (DataRow dr in DT.Rows)
                {
                    if (!string.IsNullOrEmpty(dr[0].ToString()))
                    {
                        TimeList.Add(Convert.ToInt32(dr[0].ToString()));
                    }
                }
                TimeList.Sort();
                foreach (int TimeS in TimeList)
                {
                    string BakDate = TimeS.ToString().Insert(4, "年").Insert(7, "月") + "日";
                    if (SelBakDate == BakDate)
                    {
                        this.BakDateLab += "<option value='" + BakDate + "' selected='selected'>" + BakDate + "</option>";
                    }
                    else
                    {
                        this.BakDateLab += "<option value='" + BakDate + "'>" + BakDate + "</option>";
                    }
                }
            }
            this.BakDateLab += "</select>";

            if (!string.IsNullOrEmpty(this.SelBakDate))
            {
                DataTable MarkDt = new DBLog().GetBakRollMark(Convert.ToDateTime(this.SelBakDate).ToString("yyyyMMdd"));
                this.BakMarkLab += "<table width='100%' border='1' cellspacing='0' cellpadding='0'>";
                this.BakMarkLab += "<tr><td width='20%'>站点</td><td width='20%'>备份号</td><td width='20%'>时间</td><td>是否已用</td><td width='20%'>操作</td></tr>";
                if (MarkDt != null && MarkDt.Rows.Count > 0)
                {
                    foreach (DataRow dr in MarkDt.Rows)
                    {
                        this.BakMarkLab += "<tr onmouseover=\"this.style.background='#ccc'\" onmouseout=\"this.style.background='#fff'\">";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + dr[1].ToString() + "</td>";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + dr[0].ToString() + "</td>";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + dr[0].ToString().Substring(dr[0].ToString().IndexOf('/') + 1).Replace('_', ':') + "</td>";
                        if (Convert.ToInt32(dr[2].ToString()) == 1)
                        {
                            this.BakMarkLab += "<td>已回滚</td><td>已回滚  |  <a href='#' onclick=\"javascript:ViewRBOp('" + dr[0].ToString() + "')\">察看回滚日志</a></td></tr>";
                        }
                        else
                        {
                            this.BakMarkLab += "<td>未回滚</td><td><a href='#' onclick=\"javascript:RollBack('" + dr[0].ToString() + "')\">未回滚</a>  |  <a href='#' onclick=\"javascript:ViewRBOp('" + dr[0].ToString() + "')\">察看回滚日志</a></td></tr>";
                        }
                    }
                }
                this.BakMarkLab += "</table>";
            }
        }
示例#2
0
 public MainWindow()
 {
     InitializeComponent();
     TimeS.AddHandler(Slider.MouseLeftButtonUpEvent, new MouseButtonEventHandler(TimeS_MouseLeftUp), true);
     TimeS.AddHandler(Slider.MouseLeftButtonDownEvent, new MouseButtonEventHandler(TimeS_MouseLeftDown), true);
     TimeS.AddHandler(Slider.MouseMoveEvent, new System.Windows.Input.MouseEventHandler(TimeS_Drag), true);
     TimeS.AddHandler(Slider.PreviewMouseDownEvent, new System.Windows.Input.MouseButtonEventHandler(TimeS_Down), true);
     globaltimer.Enabled = false;
     FFTtimer.Enabled    = false;
     FFTtimer.Elapsed   += new ElapsedEventHandler(FFTupd);
     Un4seen.Bass.BassNet.Registration("*****@*****.**", "2X47302224822");
     hwnd = new WindowInteropHelper(this).Handle;
     Bass.BASS_Init(-1, 44100, BASSInit.BASS_DEVICE_DEFAULT, hwnd);
 }
示例#3
0
 /// <summary>
 /// Работает
 /// </summary>
 public void Log()//работает
 {
     if (logActions != null)
     {
         foreach (LogActions act in logActions)
         {
             if (act.Telepered != null)
             {
                 act.showlog();
             }
         }
     }
     BuildLog();
     TimeS.showtime();
 }
示例#4
0
 public void Log()
 {
     if (logActions != null)
     {
         LogActions[] lg = logActions.ReturnElements();
         foreach (LogActions act in lg)
         {
             if (act.Telepered != null)
             {
                 act.showlog();
             }
         }
     }
     BuildLog();
     TimeS.showtime();
 }
示例#5
0
        private void Data_Bind()
        {
            List <string> BackupSiteStrs = Common.FileUtility.PopedomCmd.AllowRollSite(OpUser.UserId);

            List <string> WebList = Common.ConfigUtility.Config.GetSiteList();//XML配置的

            this.BakDateLab += "<select id='BakSiteList' name='BakSiteList' onchange=\"javascript:SelBakSite()\"><option value='-1'>---请选择备份站点---</option>";
            if (BackupSiteStrs != null && BackupSiteStrs.Count > 0)
            {
                foreach (var item in BackupSiteStrs)
                {
                    if (WebList.Contains(item))
                    {
                        if (item == SelBakSite)
                        {
                            this.BakDateLab += "<option value='" + item + "' selected='selected'>" + item + "</option>";
                        }
                        else
                        {
                            this.BakDateLab += "<option value='" + item + "'>" + item + "</option>";
                        }
                    }
                }
                this.BakDateLab += "</select>";
            }



            List <string> BackupDateStrs = new DBLog().GetBakDates(SelBakSite);//DataTable DT = new DBLog().GetBakDateList();

            this.BakDateLab += "<select id='BakDateList' name='BakDateList' onchange=\"javascript:SelBakDate()\"><option value='-1'>---请选择备份时间---</option>";
            if (BackupDateStrs != null && BackupDateStrs.Count > 0)// (DT != null && DT.Rows.Count > 0)
            {
                //DateTime[] TimeArray = null;
                List <int> TimeList = new List <int>();

                foreach (string BackupDateVal in BackupDateStrs) // (DataRow dr in DT.Rows)
                {
                    if (!string.IsNullOrEmpty(BackupDateVal))    //dr[0].ToString()))
                    {
                        TimeList.Add(Convert.ToInt32(BackupDateVal));
                    }
                }
                TimeList.Sort();
                foreach (int TimeS in TimeList)
                {
                    string BakDate = TimeS.ToString().Insert(4, "年").Insert(7, "月") + "日";
                    if (SelBakDate == BakDate)
                    {
                        this.BakDateLab += "<option value='" + BakDate + "' selected='selected'>" + BakDate + "</option>";
                    }
                    else
                    {
                        this.BakDateLab += "<option value='" + BakDate + "'>" + BakDate + "</option>";
                    }
                }
            }
            this.BakDateLab += "</select>";

            if (!string.IsNullOrEmpty(this.SelBakDate) && !string.IsNullOrEmpty(this.SelBakSite))
            {
                //DataTable MarkDt = new DBLog().GetBakRollMark(Convert.ToDateTime(this.SelBakDate).ToString("yyyyMMdd"));
                List <Trans.Db.Model.NRoll_Action> RollbackActions = new DBLog().GetRollbackMarks(Convert.ToDateTime(this.SelBakDate).ToString("yyyyMMdd"), this.SelBakSite);
                this.BakMarkLab += "<table width='100%' border='1' cellspacing='0' cellpadding='0'>";
                this.BakMarkLab += "<tr><td width='20%'>站点</td><td width='20%'>备份号</td><td width='20%'>时间</td><td>是否已用</td><td width='20%'>操作</td></tr>";
                if (RollbackActions != null && RollbackActions.Count > 0) // (MarkDt != null && MarkDt.Rows.Count > 0)
                {
                    foreach (var item in RollbackActions)                 //(DataRow dr in MarkDt.Rows)
                    {
                        this.BakMarkLab += "<tr onmouseover=\"this.style.background='#ccc'\" onmouseout=\"this.style.background='#fff'\">";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + item.SiteName /*dr[1].ToString()*/ + "</td>";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + item.RollCode /*dr[0].ToString()*/ + "</td>";
                        this.BakMarkLab += "<td style='white-space:normal; word-break:break-all;word-wrap:break-word'>" + item.RollCode.Substring(item.RollCode.IndexOf('/') + 1).Replace('_', ':') /*dr[0].ToString().Substring(dr[0].ToString().IndexOf('/') + 1).Replace('_', ':')*/ + "</td>";
                        if (item.IsUsed == 1)// (Convert.ToInt32(dr[2].ToString()) == 1)
                        {
                            this.BakMarkLab += "<td>已回滚</td><td>已回滚  |  <a href='#' onclick=\"javascript:ViewRBOp('" + item.RollCode /*dr[0].ToString()*/ + "')\">察看回滚日志</a></td></tr>";
                        }
                        else
                        {
                            this.BakMarkLab += "<td>未回滚</td><td><a href='#' onclick=\"javascript:RollBack('" + item.RollCode /*dr[0].ToString()*/ + "')\">未回滚</a>  |  <a href='#' onclick=\"javascript:ViewRBOp('" + item.RollCode /*dr[0].ToString()*/ + "')\">察看回滚日志</a></td></tr>";
                        }
                    }
                }
                this.BakMarkLab += "</table>";
            }
            else
            {
                this.BakMarkLab += "";
            }
        }
示例#6
0
 public void BuildLog()
 {
     TimeS.timebigtest(DateTime.Now);
 }
示例#7
0
 /// <summary>
 /// Вызывать, что бы отметку сделать по времени
 /// </summary>
 public void BuildLog()//работает
 {
     TimeS.timebigtest(DateTime.Now);
 }