fixed WebPortal & update sql

This commit is contained in:
vfedosevich 2013-05-23 11:19:07 +03:00
parent e7d5bf0c7e
commit 8577c73c4c
5 changed files with 410 additions and 10 deletions

View file

@ -1921,7 +1921,7 @@ namespace WebsitePanel.EnterpriseServer
{
SqlHelper.ExecuteNonQuery(ConnectionString, CommandType.StoredProcedure,
ObjectQualifier + "UpdateBackgroundTask",
new SqlParameter("@taskId", scheduleId),
new SqlParameter("@taskId", taskId),
new SqlParameter("@scheduleId", scheduleId),
new SqlParameter("@packageId", packageId),
new SqlParameter("@taskName", taskName),

View file

@ -63,7 +63,7 @@ namespace WebsitePanel.Portal
litTitle.Text = String.Format("{0} "{1}"",
GetAuditLogTaskName(task.Source, task.TaskName),
task.ItemName);
litStep.Text = LocalizeActivityText(task.LastLogRecord.Text);
litStep.Text = LocalizeActivityText(task.Logs.Count > 0 ? task.Logs[0].Text : String.Empty);
litStartTime.Text = task.StartDate.ToString();
// progress
@ -77,11 +77,10 @@ namespace WebsitePanel.Portal
// execution log
StringBuilder log = new StringBuilder();
task.LastLogRecords.Reverse();
if (task.LastLogRecords.Count > 0)
ViewState["lastLogDate"] = task.LastLogRecords[0].Date.AddTicks(1);
if (task.Logs.Count > 0)
ViewState["lastLogDate"] = task.Logs[0].Date.AddTicks(1);
foreach (BackgroundTaskLogRecord logRecord in task.LastLogRecords)
foreach (BackgroundTaskLogRecord logRecord in task.Logs)
{
log.Append("[").Append(GetDurationText(task.StartDate, logRecord.Date)).Append("] ");
log.Append(GetLogLineIdent(logRecord.TextIdent));

View file

@ -176,7 +176,7 @@ namespace WebsitePanel.Portal.VPS.UserControls
litElapsed.Text = new TimeSpan(d.Hours, d.Minutes, d.Seconds).ToString();
// bind records
repRecords.DataSource = task.LastLogRecords;
repRecords.DataSource = task.Logs;
repRecords.DataBind();
}
@ -213,7 +213,7 @@ namespace WebsitePanel.Portal.VPS.UserControls
// gauge
gauge.Visible = false;
if (e.Item.ItemIndex == task.LastLogRecords.Count - 1)
if (e.Item.ItemIndex == task.Logs.Count - 1)
{
gauge.Visible = true;
gauge.Total = task.IndicatorMaximum;

View file

@ -183,7 +183,7 @@ namespace WebsitePanel.Portal.VPSForPC.UserControls
litElapsed.Text = new TimeSpan(d.Hours, d.Minutes, d.Seconds).ToString();
// bind records
repRecords.DataSource = task.LastLogRecords;
repRecords.DataSource = task.Logs;
repRecords.DataBind();
}
@ -228,7 +228,7 @@ namespace WebsitePanel.Portal.VPSForPC.UserControls
// gauge
gauge.Visible = false;
if (e.Item.ItemIndex == task.LastLogRecords.Count - 1)
if (e.Item.ItemIndex == task.Logs.Count - 1)
{
gauge.Visible = true;
gauge.Total = task.IndicatorMaximum;