예제 #1
0
    protected void gridActionLogs_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        ActionLogs actionLogs = new ActionLogs(UserSession.LoginUser);

        if (_referenceType == ReferenceType.None)
        {
            actionLogs.LoadAll();
        }
        else if (_referenceType == ReferenceType.Groups)
        {
            actionLogs.LoadByGroupID(_referenceID);
        }
        else if (_referenceType == ReferenceType.Users)
        {
            actionLogs.LoadByUserID(_referenceID);
        }
        else if (_referenceType == ReferenceType.Organizations)
        {
            actionLogs.LoadByOrganizationID(_referenceID);
        }
        else if (_referenceType == ReferenceType.Products)
        {
            actionLogs.LoadByProductID(_referenceID);
        }
        else if (_referenceType == ReferenceType.ProductVersions)
        {
            actionLogs.LoadByProductVersionID(_referenceID);
        }
        else if (_referenceType == ReferenceType.Tickets)
        {
            actionLogs.LoadByTicketID(_referenceID);
        }

        gridActionLogs.VirtualItemCount = actionLogs.Count;
        gridActionLogs.DataSource       = actionLogs;
    }
예제 #2
0
    protected void gridActionLogs_NeedDataSource(object source, GridNeedDataSourceEventArgs e)
    {
        ActionLogs actionLogs = new ActionLogs(UserSession.LoginUser);

        switch (_refType)
        {
        case ReferenceType.None:
            actionLogs.LoadAll();
            break;

        case ReferenceType.Actions:
            break;

        case ReferenceType.ActionTypes:
            break;

        case ReferenceType.Addresses:
            break;

        case ReferenceType.Attachments:
            break;

        case ReferenceType.CustomFields:
            break;

        case ReferenceType.CustomValues:
            break;

        case ReferenceType.Groups:
            actionLogs.LoadByGroupID(_refID);
            break;

        case ReferenceType.GroupUsers:
            break;

        case ReferenceType.OrganizationProducts:
            break;

        case ReferenceType.Organizations:
            actionLogs.LoadByOrganizationID(_refID);
            break;

        case ReferenceType.OrganizationTickets:
            break;

        case ReferenceType.PhoneNumbers:
            break;

        case ReferenceType.PhoneTypes:
            break;

        case ReferenceType.Products:
            actionLogs.LoadByProductID(_refID);
            break;

        case ReferenceType.ProductVersions:
            actionLogs.LoadByProductVersionID(_refID);
            break;

        case ReferenceType.ProductVersionStatuses:
            break;

        case ReferenceType.TechDocs:
            break;

        case ReferenceType.Tickets:
            actionLogs.LoadByTicketID(_refID);
            break;

        case ReferenceType.TicketSeverities:
            break;

        case ReferenceType.TicketStatuses:
            break;

        case ReferenceType.Subscriptions:
            break;

        case ReferenceType.TicketTypes:
            break;

        case ReferenceType.Users:
            actionLogs.LoadByUserID(_refID);
            break;

        case ReferenceType.ActionLogs:
            break;

        case ReferenceType.BillingInfo:
            break;

        case ReferenceType.ExceptionLogs:
            break;

        case ReferenceType.Invoices:
            break;

        case ReferenceType.SystemSettings:
            break;

        case ReferenceType.TicketNextStatuses:
            break;

        case ReferenceType.UserSettings:
            break;

        case ReferenceType.TicketQueue:
            break;

        case ReferenceType.CreditCards:
            break;

        case ReferenceType.Contacts:
            break;

        default:
            break;
        }
        gridActionLogs.VirtualItemCount = actionLogs.Count;
        gridActionLogs.DataSource       = actionLogs;
    }