private string GetQrCode(PersonProfilesModel model)
        {
            string lgu  = _repoLgu.GetAll().FirstOrDefault(x => x.Id == model.LguId.Value).LguName;
            string brgy = _repoBarangay.GetAll().FirstOrDefault(x => x.Id == model.BgryId.Value).BarangayName;

            return(lgu + " " + brgy + " " + model.Fullname);
        }
 public void UpdatePersonProfile(PersonProfilesModel model)
 {
     _repoPersonProfile.UpdateAsync(new PersonProfile
     {
         Id                = model.Id,
         Fullname          = model.Fullname,
         LguId             = model.LguId,
         BrgyId            = model.BgryId,
         PersonStatus      = model.PersonStatus,
         PrincipalPersonId = model.PrincipalPersonId,
         QDays             = model.QDays,
         QDateStarted      = model.QDateStarted,
         QDateEnded        = model.QDateEnded,
         PicPath           = model.PicPath,
         DateCreated       = model.DateCreated,
         QrCode            = model.QrCode,
         Address           = model.Address,
         Contact           = model.Contact,
         BrgyVerified      = model.BrgyVerified,
         CHDOHVerified     = model.CHDOHVerified,
         BrgyRemarks       = model.BrgyRemarks,
         CHDOHRemarks      = model.CHDOHRemarks,
         SwabTestDate      = model.SwabTestDate
     });
 }
        public void Put(PersonProfilesModel model)
        {
            if (model.Id == 0)
            {
                if (model.PrincipalPersonId == null || model.PrincipalPersonId == 0)
                {
                    model.PersonStatus = "P";
                }

                _personService.CreatePersonProfile(model);
            }
            else
            {
                _personService.UpdatePersonProfile(model);
            }
        }
示例#4
0
 public void CreatePersonProfile(PersonProfilesModel model)
 {
     _repoPersonProfile.AddAsync(new PersonProfile
     {
         Fullname          = model.Fullname,
         LguId             = model.LguId,
         BgryId            = model.BgryId,
         PersonStatus      = model.PersonStatus,
         PrincipalPersonId = model.PrincipalPersonId,
         QDays             = model.QDays,
         QDateStarted      = model.QDateStarted,
         QDateEnded        = model.QDateEnded,
         PicPath           = model.PicPath,
         DateCreated       = model.DateCreated,
         QrCode            = model.QrCode
     });
 }
 public void CreatePersonProfile(PersonProfilesModel model)
 {
     _repoPersonProfile.AddAsync(new PersonProfile
     {
         Fullname          = model.Fullname,
         LguId             = model.LguId,
         BrgyId            = model.BgryId,
         PersonStatus      = model.PersonStatus,
         PrincipalPersonId = model.PrincipalPersonId,
         QDays             = model.QDays,
         QDateStarted      = model.QDateStarted,
         QDateEnded        = model.QDateEnded,
         PicPath           = model.PicPath,
         DateCreated       = model.DateCreated,
         QrCode            = GetQrCode(model),
         Contact           = model.Contact,
         Address           = model.Address,
         SwabTestDate      = model.SwabTestDate
     });
 }
        public void CreatePersonProfile(PersonProfilesModel model)
        {
            var data = new PersonProfile
            {
                Fullname          = model.Fullname,
                LguId             = model.LguId,
                BrgyId            = model.BgryId,
                PersonStatus      = model.PersonStatus,
                PrincipalPersonId = model.PrincipalPersonId,
                QDays             = model.QDays,
                QDateStarted      = model.QDateStarted,
                QDateEnded        = model.QDateEnded,
                PicPath           = model.PicPath,
                DateCreated       = model.DateCreated,
                QrCode            = model.CaseNo,
                Contact           = model.Contact,
                Address           = model.Address,
                SwabTestDate      = model.SwabTestDate,
                SwabArea          = model.SwabArea,
                CaseNo            = model.CaseNo,
                Gender            = model.Gender,
                DateLabConfirm    = model.DateLabConfirm,
                BrgyRemarks       = model.BrgyRemarks,
                CHDOHRemarks      = model.CHDOHRemarks,
                IsolationCenter   = model.IsolationCenterId,
                Age         = model.Age,
                UserAgent   = model.UserAgent,
                Family      = model.Family,
                Workmate    = model.Workmate,
                Friend      = model.Friend,
                Symptomatic = model.Symptomatic,
                Long        = model.Long,
                Lat         = model.Lat
            };

            _repoPersonProfile.AddAsync(data);
        }
 public void UpdatePersonProfile(PersonProfilesModel model)
 {
     _repoPersonProfile.UpdateAsync(new PersonProfile
     {
         Id                = model.Id,
         Fullname          = model.Fullname,
         LguId             = model.LguId,
         BrgyId            = model.BgryId,
         PersonStatus      = model.PersonStatus,
         PrincipalPersonId = model.PrincipalPersonId,
         QDays             = model.QDays,
         QDateStarted      = model.QDateStarted,
         QDateEnded        = model.QDateEnded,
         PicPath           = model.PicPath,
         DateCreated       = model.DateCreated,
         QrCode            = model.QrCode,
         Address           = model.Address,
         Contact           = model.Contact,
         BrgyVerified      = model.BrgyVerified,
         CHDOHVerified     = model.CHDOHVerified,
         BrgyRemarks       = model.BrgyRemarks,
         CHDOHRemarks      = model.CHDOHRemarks,
         SwabTestDate      = model.SwabTestDate,
         SwabArea          = model.SwabArea,
         CaseNo            = model.CaseNo,
         Gender            = model.Gender,
         DateLabConfirm    = model.DateLabConfirm,
         IsolationCenter   = model.IsolationCenterId,
         Age               = model.Age,
         UserAgent         = model.UserAgent,
         VerifiedBy        = model.VerifiedBy,
         ConfirmedBy       = model.ConfirmedBy,
         VerifiedDate      = model.VerifiedDate,
         ConfirmedDate     = model.ConfirmedDate,
     });
 }
示例#8
0
 public void Put(int id, PersonProfilesModel model)
 {
     _personService.UpdatePersonProfile(model);
 }
示例#9
0
 public void Post(PersonProfilesModel model)
 {
     _personService.CreatePersonProfile(model);
 }