public static WorkerExam CreateWorkerExam(global::System.DateTimeOffset requiredBy,
                                                  string personnelNumber,
                                                  string testId,
                                                  int score,
                                                  global::System.DateTimeOffset completedOn,
                                                  global::Microsoft.Dynamics.DataEntities.TestType testType,
                                                  global::Microsoft.Dynamics.DataEntities.Worker worker)
        {
            WorkerExam workerExam = new WorkerExam();

            workerExam.RequiredBy      = requiredBy;
            workerExam.PersonnelNumber = personnelNumber;
            workerExam.TestId          = testId;
            workerExam.Score           = score;
            workerExam.CompletedOn     = completedOn;
            if ((testType == null))
            {
                throw new global::System.ArgumentNullException("testType");
            }
            workerExam.TestType = testType;
            if ((worker == null))
            {
                throw new global::System.ArgumentNullException("worker");
            }
            workerExam.Worker = worker;
            return(workerExam);
        }
        public static PersonExam CreatePersonExam(string partyNumber,
                                                  string testId,
                                                  global::System.DateTimeOffset requiredBy,
                                                  int score,
                                                  global::System.DateTimeOffset completedOn,
                                                  global::Microsoft.Dynamics.DataEntities.TestType testType,
                                                  global::Microsoft.Dynamics.DataEntities.Person person)
        {
            PersonExam personExam = new PersonExam();

            personExam.PartyNumber = partyNumber;
            personExam.TestId      = testId;
            personExam.RequiredBy  = requiredBy;
            personExam.Score       = score;
            personExam.CompletedOn = completedOn;
            if ((testType == null))
            {
                throw new global::System.ArgumentNullException("testType");
            }
            personExam.TestType = testType;
            if ((person == null))
            {
                throw new global::System.ArgumentNullException("person");
            }
            personExam.Person = person;
            return(personExam);
        }
Exemplo n.º 3
0
 partial void OnTestTypeChanging(global::Microsoft.Dynamics.DataEntities.TestType value);
Exemplo n.º 4
0
        public static JobTemplateExam CreateJobTemplateExam(string jobTemplateId, string testId, global::Microsoft.Dynamics.DataEntities.JobTemplate jobTemplate, global::Microsoft.Dynamics.DataEntities.TestType testType)
        {
            JobTemplateExam jobTemplateExam = new JobTemplateExam();

            jobTemplateExam.JobTemplateId = jobTemplateId;
            jobTemplateExam.TestId        = testId;
            if ((jobTemplate == null))
            {
                throw new global::System.ArgumentNullException("jobTemplate");
            }
            jobTemplateExam.JobTemplate = jobTemplate;
            if ((testType == null))
            {
                throw new global::System.ArgumentNullException("testType");
            }
            jobTemplateExam.TestType = testType;
            return(jobTemplateExam);
        }