Beispiel #1
0
        public void UpdateTraining(NEC_NS_Evidencija.Backend.Dto.Training training, Coach coach)
        {
            var dbTraining = _trainingRepo.Get(t => t.TRAINING_INTERNAL_ID == training.Training_Internal_Id);

            COACH dbCoach = null;

            if (coach != null)
            {
                dbCoach = _coachRepo.Get(c => c.COACH_INTERNAL_ID == coach.Coach_Internal_Id);
            }

            dbTraining.DURATION  = training.Duration;
            dbTraining.NOTES     = training.Notes;
            dbTraining.STARTDATE = DateTime.ParseExact(training.StartDate, "yyyy-MM-dd",
                                                       System.Globalization.CultureInfo.InvariantCulture);
            if (dbCoach != null)
            {
                dbTraining.COACH = dbCoach;
            }
            dbTraining.TRAININGTHEME    = training.TrainingTheme;
            dbTraining.TRAININGTYPE     = training.TrainingType;
            dbTraining.TRAINING_QUALITY = training.TrainingQuality;
            dbTraining.RELATIONSHIP     = training.Relationship;

            _trainingRepo.Update(dbTraining);
            _unitOfWork.Commit();
        }
Beispiel #2
0
        /// <summary>
        /// Fills the database by reading all files
        /// </summary>
        public static void FillDatabase()
        {
            // Initializing the variables
            coaches     = new List <Coach>();
            credentials = new List <Credentials>();
            teams       = new List <Team>();

            // Filling the lists
            COACH.ReadAll();
        }
        public static bool SendCoachSignUpEmail(ORGANIZATION organization, COACH coach)
        {
            var subject = "Thank you for signing up for MyFileIT";

            var message = GetCoachSignUpEmail(organization, coach);

            string error = "";

            return(EmailHelper.SendEmailAsync(coach.EMAILADDRESS, new List <string>(), new List <string>(), subject, message, true, new List <string>(), ref error));
        }
        private static string GetCoachSignUpEmail(ORGANIZATION organization, COACH coach)
        {
            var result = new System.Text.StringBuilder();

            result.AppendLine("<p>Dear " + coach.FIRSTNAME + " " + coach.LASTNAME + ",</p>");
            result.AppendLine("<p>" + organization.NAME + " has signed up to be in MyFileIT network and allow coaches/staff and parents to use the MyFileIT mobile app which allows the user the ability to take pictures of important documents like physical form, code conduct, birth certificates, permission slips and other required documents to participate in organization’s activities and securely upload them and share them with you. There is no cost to you to participate as a coach or staff member. </p>");
            result.AppendLine("<p>Click here to register and create a coach / staff profile.</p> ");
            result.AppendLine("<p>Http://b,fdsfdjkfdjkljsfdlkfdjlfdjdflgjldgjldsgjlsdjgsdfl;</p>");
            result.AppendLine("<p>If you do not register no user will be able to share their documents with you.  In addition using MyFileIT makes it much easier and more efficient in handling paperwork  as well as giving you 24/7/365 access to your students important documents and being able to share the documents with any emergency staff with MyFileIT network and outside. Please send up now.</p>");

            result.AppendLine("<p>Thanks</br>");
            result.AppendLine(organization.DIRECTORNAME + "</p>");


            return(result.ToString());
        }
Beispiel #5
0
        public void CreateCoach(Coach coach)
        {
            var dbCoach = new COACH();

            dbCoach.PAYMENTRATE       = coach.PaymentRate;
            dbCoach.PAYOFFRATE        = coach.PayOffRate;
            dbCoach.COACH_INTERNAL_ID = coach.Coach_Internal_Id;
            dbCoach.PAYOFF            = 0;
            dbCoach.PERSON            = new PERSON
            {
                FIRSTNAME = coach.FirstName,
                LASTNAME  = coach.LastName,
                EMAIL     = coach.Email,
                TELEPHONE = coach.Telephone
            };

            _coachRepo.Add(dbCoach);

            _unitOfWork.Commit();
        }
 public CoachDTO(COACH coachEF, string emailOverride = "")
 {
     ID                 = coachEF.ID;
     ORGANIZATIONID     = coachEF.ORGANIZATIONID;
     APPUSERID          = coachEF.APPUSERID;
     FIRSTNAME          = coachEF.FIRSTNAME;
     LASTNAME           = coachEF.LASTNAME;
     ADDRESS1           = coachEF.ADDRESS1;
     ADDRESS2           = coachEF.ADDRESS2;
     CITY               = coachEF.CITY;
     STATECODE          = coachEF.STATECODE;
     ZIPCODE            = coachEF.ZIPCODE;
     PHONE              = coachEF.PHONE;
     EMAILADDRESS       = emailOverride.Length > 0 ? emailOverride : coachEF.EMAILADDRESS;
     SEX                = coachEF.SEX;
     YEARCODE           = coachEF.YEARCODE;
     SPORTTYPEID        = coachEF.SPORTTYPEID;
     RELATIONSHIPTYPEID = coachEF.RELATIONSHIPTYPEID;
     COACHSTATUSID      = coachEF.COACHSTATUSID;
     TEAMEVENTID        = int.Parse(coachEF.TEAMEVENTID.ToString());
 }