using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Telerik.Web.UI;
using System.Web.UI;

namespace Sonic.Infrastructure
{
    public enum PairedMinMax { NotSet = 0, GreaterThan = 1, GreaterThanOrEqual = 2, LesserThan = 3, LesserThanOrEqual = 4 }

    public class PairedRadDatePicker : RadDatePicker, IPostBackEventHandler
    {
        public string PairedControlID
        {
            get
            {
                if (ViewState["PairedControlID"] == null)
                {
                    ViewState["PairedControlID"] = string.Empty;
                }

                return ViewState["PairedControlID"].ToString();
            }
            set
            {
                ViewState["PairedControlID"] = value;
            }
        }

        public PairedMinMax PairedOperator
        {
            get
            {
                if (ViewState["PairedOperator"] == null)
                {
                    ViewState["PairedOperator"] = PairedMinMax.GreaterThan;
                }

                return (PairedMinMax)Enum.Parse(typeof(PairedMinMax), ViewState["PairedOperator"].ToString());
            }
            set
            {
                ViewState["PairedOperator"] = value;
            }
        }
    }
}