76 lines
1.9 KiB
C#
76 lines
1.9 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.Web;
|
|
using System.Web.UI;
|
|
using System.Web.UI.WebControls;
|
|
|
|
namespace NKC_WF.WebUserControls
|
|
{
|
|
public partial class cmp_StackBuildDetail : BaseUserControl
|
|
{
|
|
protected void Page_Load(object sender, EventArgs e)
|
|
{
|
|
|
|
}
|
|
|
|
|
|
public string cssFlashNext(object _isNext)
|
|
{
|
|
string answ = "";
|
|
if (_isNext.ToString() == "1")
|
|
{
|
|
answ = " flashColor";
|
|
}
|
|
return answ;
|
|
}
|
|
public string cssByPrepared(object _prepared, object _isNext)
|
|
{
|
|
string answ = "table-secondary border border-secondary border-thick rounded";
|
|
if (_isNext.ToString() == "1")
|
|
{
|
|
answ = "table-primary flashColor rounded";
|
|
}
|
|
else
|
|
{
|
|
if (!string.IsNullOrEmpty(_prepared.ToString()))
|
|
{
|
|
answ = "table-success border border-success border-thick rounded";
|
|
}
|
|
}
|
|
return answ;
|
|
}
|
|
public string getProgressStyle(object _num, object _den)
|
|
{
|
|
string answ = "width: 10%";
|
|
int num = 0;
|
|
int den = 1;
|
|
int.TryParse(_num.ToString(), out num);
|
|
int.TryParse(_den.ToString(), out den);
|
|
answ = $"width: {num * 100 / den}%";
|
|
return answ;
|
|
}
|
|
|
|
public void doUpdate()
|
|
{
|
|
repCtrl.DataBind();
|
|
|
|
repProgress.DataBind();
|
|
}
|
|
|
|
public int StackId
|
|
{
|
|
set
|
|
{
|
|
hfStackId.Value = value.ToString();
|
|
doUpdate();
|
|
}
|
|
get
|
|
{
|
|
int answ = 0;
|
|
int.TryParse(hfStackId.Value, out answ);
|
|
return answ;
|
|
}
|
|
}
|
|
}
|
|
} |