Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="Error" /> class.
 /// </summary>
 /// <param name="Code">Code (required).</param>
 /// <param name="Level">Level (required).</param>
 /// <param name="Cause">Cause.</param>
 /// <param name="Message">Message (required).</param>
 public Error(string Code = default(string), LevelEnum?Level = default(LevelEnum?), Error Cause = default(Error), string Message = default(string))
 {
     // to ensure "Code" is required (not null)
     if (Code == null)
     {
         throw new InvalidDataException("Code is a required property for Error and cannot be null");
     }
     else
     {
         this.Code = Code;
     }
     // to ensure "Level" is required (not null)
     if (Level == null)
     {
         throw new InvalidDataException("Level is a required property for Error and cannot be null");
     }
     else
     {
         this.Level = Level;
     }
     // to ensure "Message" is required (not null)
     if (Message == null)
     {
         throw new InvalidDataException("Message is a required property for Error and cannot be null");
     }
     else
     {
         this.Message = Message;
     }
     this.Cause = Cause;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="TeamEventStatusPlayoff" /> class.
 /// </summary>
 /// <param name="Level">The highest playoff level the team reached..</param>
 /// <param name="CurrentLevelRecord">CurrentLevelRecord.</param>
 /// <param name="Record">Record.</param>
 /// <param name="Status">Current competition status for the playoffs..</param>
 /// <param name="PlayoffAverage">The average match score during playoffs. Year specific. May be null if not relevant for a given year..</param>
 public TeamEventStatusPlayoff(LevelEnum?Level = default(LevelEnum?), WLTRecord CurrentLevelRecord = default(WLTRecord), WLTRecord Record = default(WLTRecord), StatusEnum?Status = default(StatusEnum?), int?PlayoffAverage = default(int?))
 {
     this.Level = Level;
     this.CurrentLevelRecord = CurrentLevelRecord;
     this.Record             = Record;
     this.Status             = Status;
     this.PlayoffAverage     = PlayoffAverage;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="TeamEventStatusPlayoff" /> class.
 /// </summary>
 /// <param name="level">The highest playoff level the team reached..</param>
 /// <param name="currentLevelRecord">currentLevelRecord.</param>
 /// <param name="record">record.</param>
 /// <param name="status">Current competition status for the playoffs..</param>
 /// <param name="playoffAverage">The average match score during playoffs. Year specific. May be null if not relevant for a given year..</param>
 public TeamEventStatusPlayoff(LevelEnum?level = default(LevelEnum?), WLTRecord currentLevelRecord = default(WLTRecord), WLTRecord record = default(WLTRecord), StatusEnum?status = default(StatusEnum?), int playoffAverage = default(int))
 {
     this.Level = level;
     this.CurrentLevelRecord = currentLevelRecord;
     this.Record             = record;
     this.Status             = status;
     this.PlayoffAverage     = playoffAverage;
 }
Ejemplo n.º 4
0
        public static GroupAddView GetGroupAddView(LevelEnum?level, Guid?ofReferenceId, Guid?byReferenceId, Guid?byAppUserId, Guid appUserId)
        {
            ApplicationDbContext db   = new ApplicationDbContext();
            GroupAddView         view = GetGroupAddView(db, level, ofReferenceId, byReferenceId, byAppUserId, appUserId);

            db.Dispose();
            return(view);
        }
Ejemplo n.º 5
0
        public static GroupAddView GetGroupAddView(ApplicationDbContext db, LevelEnum?level, Guid?ofReferenceId, Guid?byReferenceId, Guid?byAppUserId, Guid appUserId)
        {
            //Build a list of companies/branches/users from level if set
            List <GroupAddMemberView> members = new List <GroupAddMemberView>();
            GroupAddView view = new GroupAddView();

            if (level != null)  //Build a list of users for this view
            {
                switch (level.Value)
                {
                case LevelEnum.Company:
                    List <Company> companies = CompanyHelpers.GetAllCompaniesForGroupForUser(db, appUserId);
                    foreach (Company company in companies)
                    {
                        members.Add(GroupMemberViewHelpers.CreateGroupAddMemberViewMember(db, false, company.CompanyId, company.CompanyName));
                    }
                    break;

                case LevelEnum.Branch:
                    List <Branch> branches = BranchHelpers.GetAllBranchesForGroupForUser(db, appUserId);
                    foreach (Branch branch in branches)
                    {
                        members.Add(GroupMemberViewHelpers.CreateGroupAddMemberViewMember(db, false, branch.BranchId, branch.BranchName + ", " + branch.AddressTownCity));
                    }
                    break;

                case LevelEnum.User:
                    List <AppUser> users = AppUserHelpers.GetAllAppUsersForGroupForUser(db, appUserId);
                    foreach (AppUser user in users)
                    {
                        members.Add(GroupMemberViewHelpers.CreateGroupAddMemberViewMember(db, false, user.AppUserId, user.FirstName + " " + user.LastName));
                    }
                    break;
                }

                view.Type         = level.Value;
                view.scratchEntry = false;
                view.Members      = members;
            }
            else //return blank view with blank users as this is new from scratch
            {
                view.scratchEntry = true;  //this  will be used in view to stop the changing fo the 'type' field.

                //build members as User as this is the default
                List <AppUser> users = AppUserHelpers.GetAllAppUsersForGroupForUser(db, appUserId);
                foreach (AppUser user in users)
                {
                    members.Add(GroupMemberViewHelpers.CreateGroupAddMemberViewMember(db, false, user.AppUserId, user.FirstName + " " + user.LastName));
                }

                view.Members = members;
            }

            return(view);
        }
Ejemplo n.º 6
0
        // GET: Groups/Create
        //first 4 variables come from the +Button on the general info screens.
        public ActionResult Create(LevelEnum?level, Guid?ofReferenceId, Guid?byReferenceId, Guid?byAppUserId, Guid?appUserId)
        {
            if (appUserId == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }

            GroupAddView model = GroupViewHelpers.GetGroupAddView(level, ofReferenceId, byReferenceId, byAppUserId, appUserId.Value);

            return(View(model));
        }
Ejemplo n.º 7
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogDto" /> class.
 /// </summary>
 /// <param name="Level">Defines the log severity..</param>
 /// <param name="WindowsIdentity">The name of the user that performed the action that was logged..</param>
 /// <param name="ProcessName">The name of the process..</param>
 /// <param name="TimeStamp">The exact date and time the action was performed..</param>
 /// <param name="Message">The log message. This can also be a message logged through the Log Message activity in UiPath Studio..</param>
 /// <param name="JobKey">The key of the job running the process that generated the log, if any..</param>
 /// <param name="RawMessage">A JSON format message containing all the above fields..</param>
 /// <param name="RobotName">The name of the Robot that generated the log..</param>
 /// <param name="MachineId">The Id of the Machine on which the Robot that generated the log is running..</param>
 /// <param name="Id">Id.</param>
 public LogDto(LevelEnum?Level = default(LevelEnum?), string WindowsIdentity = default(string), string ProcessName = default(string), DateTime?TimeStamp = default(DateTime?), string Message = default(string), Guid?JobKey = default(Guid?), string RawMessage = default(string), string RobotName = default(string), long?MachineId = default(long?), long?Id = default(long?))
 {
     this.Level           = Level;
     this.WindowsIdentity = WindowsIdentity;
     this.ProcessName     = ProcessName;
     this.TimeStamp       = TimeStamp;
     this.Message         = Message;
     this.JobKey          = JobKey;
     this.RawMessage      = RawMessage;
     this.RobotName       = RobotName;
     this.MachineId       = MachineId;
     this.Id = Id;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="V11UserRightResponse" /> class.
 /// </summary>
 /// <param name="userId">userId.</param>
 /// <param name="name">name.</param>
 /// <param name="level">level.</param>
 /// <param name="userType">userType.</param>
 /// <param name="isInvite">isInvite.</param>
 public V11UserRightResponse(Guid?userId = default(Guid?), string name = default(string), LevelEnum?level = default(LevelEnum?), UserTypeEnum?userType = default(UserTypeEnum?), bool?isInvite = default(bool?))
 {
     this.UserId   = userId;
     this.Name     = name;
     this.Level    = level;
     this.UserType = userType;
     this.IsInvite = isInvite;
 }
Ejemplo n.º 9
0
 /// <summary>
 /// Initializes a new instance of the <see cref="DocumentAudit" /> class.
 /// </summary>
 /// <param name="Name">Name.</param>
 /// <param name="User">User.</param>
 /// <param name="Workspace">Workspace.</param>
 /// <param name="TransactionId">TransactionId.</param>
 /// <param name="TransactionInitiator">TransactionInitiator.</param>
 /// <param name="Application">Application.</param>
 /// <param name="ServiceName">ServiceName.</param>
 /// <param name="Level">Level.</param>
 /// <param name="Timestamp">Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z.</param>
 /// <param name="Status">Status.</param>
 /// <param name="ActionContext">ActionContext.</param>
 /// <param name="Action">Action.</param>
 /// <param name="Entity">Entity.</param>
 /// <param name="Changes">Changes.</param>
 public DocumentAudit(string Name = null, DomainEntityRef User = null, DomainEntityRef Workspace = null, string TransactionId = null, bool?TransactionInitiator = null, string Application = null, string ServiceName = null, LevelEnum?Level = null, DateTime?Timestamp = null, StatusEnum?Status = null, ActionContextEnum?ActionContext = null, ActionEnum?Action = null, AuditEntityReference Entity = null, List <AuditChange> Changes = null)
 {
     this.Name                 = Name;
     this.User                 = User;
     this.Workspace            = Workspace;
     this.TransactionId        = TransactionId;
     this.TransactionInitiator = TransactionInitiator;
     this.Application          = Application;
     this.ServiceName          = ServiceName;
     this.Level                = Level;
     this.Timestamp            = Timestamp;
     this.Status               = Status;
     this.ActionContext        = ActionContext;
     this.Action               = Action;
     this.Entity               = Entity;
     this.Changes              = Changes;
 }
Ejemplo n.º 10
0
 /// <summary>
 /// Initializes a new instance of the <see cref="EventLog" /> class.
 /// </summary>
 /// <param name="Name">Name.</param>
 /// <param name="ErrorEntity">ErrorEntity.</param>
 /// <param name="RelatedEntity">RelatedEntity.</param>
 /// <param name="Timestamp">Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z.</param>
 /// <param name="Level">Level.</param>
 /// <param name="Category">Category.</param>
 /// <param name="CorrelationId">CorrelationId.</param>
 /// <param name="EventMessage">EventMessage.</param>
 public EventLog(string Name = null, DomainEntityRef ErrorEntity = null, DomainEntityRef RelatedEntity = null, DateTime?Timestamp = null, LevelEnum?Level = null, CategoryEnum?Category = null, string CorrelationId = null, EventMessage EventMessage = null)
 {
     this.Name          = Name;
     this.ErrorEntity   = ErrorEntity;
     this.RelatedEntity = RelatedEntity;
     this.Timestamp     = Timestamp;
     this.Level         = Level;
     this.Category      = Category;
     this.CorrelationId = CorrelationId;
     this.EventMessage  = EventMessage;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="QualityAuditLogMessage" /> class.
 /// </summary>
 /// <param name="Id">Id of the audit message..</param>
 /// <param name="UserHomeOrgId">Home Organization Id associated with this audit message..</param>
 /// <param name="UserTrusteeOrgId">Trustee Organization Id if this audit message is from trustee access..</param>
 /// <param name="User">User associated with this audit message..</param>
 /// <param name="Client">Client associated with this audit message..</param>
 /// <param name="RemoteIps">List of IP addresses of systems that originated or handled the request..</param>
 /// <param name="ServiceName">Name of the service that logged this audit message..</param>
 /// <param name="Level">The level of this audit message..</param>
 /// <param name="Status">The status of the action of this audit message..</param>
 /// <param name="EventDate">Date and time of when the audit message was logged. Date time is represented as an ISO-8601 string. For example: yyyy-MM-ddTHH:mm:ss[.mmm]Z.</param>
 /// <param name="MessageInfo">Message describing the event being audited..</param>
 /// <param name="Action">Action that took place..</param>
 /// <param name="Entity">Entity that was impacted..</param>
 /// <param name="EntityType">Type of the entity that was impacted..</param>
 /// <param name="PropertyChanges">List of properties that were changed and changes made to those properties..</param>
 /// <param name="Context">Additional context for this message..</param>
 public QualityAuditLogMessage(string Id = null, string UserHomeOrgId = null, string UserTrusteeOrgId = null, DomainEntityRef User = null, AddressableEntityRef Client = null, List <string> RemoteIps = null, ServiceNameEnum?ServiceName = null, LevelEnum?Level = null, StatusEnum?Status = null, DateTime?EventDate = null, MessageInfo MessageInfo = null, ActionEnum?Action = null, DomainEntityRef Entity = null, EntityTypeEnum?EntityType = null, List <PropertyChange> PropertyChanges = null, Dictionary <string, string> Context = null)
 {
     this.Id               = Id;
     this.UserHomeOrgId    = UserHomeOrgId;
     this.UserTrusteeOrgId = UserTrusteeOrgId;
     this.User             = User;
     this.Client           = Client;
     this.RemoteIps        = RemoteIps;
     this.ServiceName      = ServiceName;
     this.Level            = Level;
     this.Status           = Status;
     this.EventDate        = EventDate;
     this.MessageInfo      = MessageInfo;
     this.Action           = Action;
     this.Entity           = Entity;
     this.EntityType       = EntityType;
     this.PropertyChanges  = PropertyChanges;
     this.Context          = Context;
 }
Ejemplo n.º 12
0
 /// <summary>
 /// Initializes a new instance of the <see cref="LogRequest" /> class.
 /// </summary>
 /// <param name="KeyValueProperties">KeyValueProperties.</param>
 /// <param name="Level">Level.</param>
 /// <param name="Message">Message.</param>
 public LogRequest(List <Object> KeyValueProperties = default(List <Object>), LevelEnum?Level = default(LevelEnum?), string Message = default(string))
 {
     this.KeyValueProperties = KeyValueProperties;
     this.Level   = Level;
     this.Message = Message;
 }
 /// <summary>
 /// Initializes a new instance of the <see cref="AgentMaxUtilization" /> class.
 /// </summary>
 /// <param name="Utilization">Map of media type to utilization settings.  Valid media types include call, callback, chat, email, and message..</param>
 /// <param name="Level">Level.</param>
 public AgentMaxUtilization(Dictionary <string, MediaUtilization> Utilization = null, LevelEnum?Level = null)
 {
     this.Utilization = Utilization;
     this.Level       = Level;
 }
Ejemplo n.º 14
0
 /// <summary>
 /// Initializes a new instance of the <see cref="AdjustmentData" /> class.
 /// </summary>
 /// <param name="Level">Identifies how the adjustment is applied to the order.</param>
 /// <param name="Type">Identifies the adjustment type.</param>
 public AdjustmentData(LevelEnum?Level = default(LevelEnum?), TypeEnum?Type = default(TypeEnum?))
 {
     this.Level = Level;
     this.Type  = Type;
 }
Ejemplo n.º 15
0
 /// <summary>
 /// Initializes a new instance of the <see cref="V11UserRightRequest" /> class.
 /// </summary>
 /// <param name="userId">userId.</param>
 /// <param name="level">level.</param>
 public V11UserRightRequest(Guid?userId = default(Guid?), LevelEnum?level = default(LevelEnum?))
 {
     this.UserId = userId;
     this.Level  = level;
 }