Exemplo n.º 1
0
        public static string GetProductVersionStatuses(RestCommand command, bool orderByDateCreated = false)
        {
            ProductVersionStatuses items = new ProductVersionStatuses(command.LoginUser);

            if (orderByDateCreated)
            {
                items.LoadByOrganizationID(command.Organization.OrganizationID, "DateCreated DESC");
            }
            else
            {
                items.LoadByOrganizationID(command.Organization.OrganizationID);
            }
            return(items.GetXml("ProductVersionStatuses", "ProductVersionStatus", true, command.Filters));
        }
        public static string GetProductVersionStatuses(RestCommand command)
        {
            ProductVersionStatuses productVersionStatuses = new ProductVersionStatuses(command.LoginUser);

            productVersionStatuses.LoadByOrganizationID(command.Organization.OrganizationID);

            if (command.Format == RestFormat.XML)
            {
                return(productVersionStatuses.GetXml("ProductVersionStatuses", "ProductVersionStatus", true, command.Filters));
            }
            else
            {
                throw new RestException(HttpStatusCode.BadRequest, "Invalid data format");
            }
        }
Exemplo n.º 3
0
    private void LoadStatuses()
    {
        cmbStatus.Items.Clear();
        ProductVersionStatuses statuses = new ProductVersionStatuses(UserSession.LoginUser);

        statuses.LoadByOrganizationID(UserSession.LoginUser.OrganizationID);
        foreach (ProductVersionStatus status in statuses)
        {
            cmbStatus.Items.Add(new RadComboBoxItem(status.Name, status.ProductVersionStatusID.ToString()));
        }

        if (cmbStatus.Items.Count > 0)
        {
            cmbStatus.SelectedIndex = 0;
        }
    }