Пример #1
0
    /// <summary>
    /// Returns translation priority text.
    /// </summary>
    /// <param name="parameters">Priority integer constant</param>
    public static string GetTranslationPriority(params object[] parameters)
    {
        switch (parameters.Length)
        {
        case 1:
            return(TranslationServiceHelper.GetPriorityText(ValidationHelper.GetInteger(parameters[0], 0)));

        default:
            throw new NotSupportedException();
        }
    }
    protected override void CreateChildControls()
    {
        base.CreateChildControls();
        if (!StopProcessing)
        {
            if (drpPriority.Items.Count == 0)
            {
                ListItem normalPriority = new ListItem(TranslationServiceHelper.GetPriorityText(1), "1");
                normalPriority.Selected = true;

                drpPriority.Items.Add(new ListItem(TranslationServiceHelper.GetPriorityText(0), "0"));
                drpPriority.Items.Add(normalPriority);
                drpPriority.Items.Add(new ListItem(TranslationServiceHelper.GetPriorityText(2), "2"));
            }
        }
    }