using System;

namespace NKC_WF.WebUserControls
{
    public partial class cmp_kittingCart : BaseUserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
        }

        public string getCssByNums(object _numWait, object _numReady, object _numOtherWait, object _numOtherReady)
        {
            string answ = "alert-success border-success";
            int numWait = 0;
            int numReady = 0;
            int numOtherWait = 0;
            int numOtherReady = 0;
            int.TryParse(_numWait.ToString(), out numWait);
            int.TryParse(_numReady.ToString(), out numReady);
            int.TryParse(_numOtherWait.ToString(), out numOtherWait);
            int.TryParse(_numOtherReady.ToString(), out numOtherReady);
            if (numWait > 0)
            {
                answ = "alert-danger border-danger";
            }
            else if (numReady + numOtherWait > 0)
            {
                answ = "alert-warning border-warning";
            }
            else
            {
                answ = "alert-success border-success";
            }
            return answ;
        }

        public void doUpdate()
        {
            repCarts.DataBind();
        }
    }
}