Ejemplo n.º 1
0
        private bool IsTypeRequested(string status, int editor)
        {
            switch (Convert.ToInt32(ddlWhichContent.SelectedItem.Value))
            {
            case 0:
                return(StatusCodes.isAwaitingEdit(status) ||
                       StatusCodes.isEditing(status));

            case 1:
                if (editor == 0)
                {
                    return(false);
                }
                return(StatusCodes.isAwaitingEdit(status) ||
                       StatusCodes.isRequiresUpdate(status) ||
                       StatusCodes.isEditing(status) ||
                       StatusCodes.isAwaitingApproval(status));

            case 2:
                if (editor == 0)
                {
                    return(false);
                }
                return(true);

            default:
                return(false);
            }
        }