示例#1
0
        private System.IAsyncResult OnBeginUpdatePerson(object[] inValues, System.AsyncCallback callback, object asyncState)
        {
            string lastName = ((string)(inValues[0]));

            Common.Person updatedPerson = ((Common.Person)(inValues[1]));
            return(this.BeginUpdatePerson(lastName, updatedPerson, callback, asyncState));
        }
示例#2
0
 private object[] OnEndGetPerson(System.IAsyncResult result)
 {
     Common.Person retVal = this.EndGetPerson(result);
     return(new object[] {
         retVal
     });
 }
示例#3
0
 public void AddPersonAsync(Common.Person newPerson, object userState)
 {
     if ((this.onBeginAddPersonDelegate == null))
     {
         this.onBeginAddPersonDelegate = new BeginOperationDelegate(this.OnBeginAddPerson);
     }
     if ((this.onEndAddPersonDelegate == null))
     {
         this.onEndAddPersonDelegate = new EndOperationDelegate(this.OnEndAddPerson);
     }
     if ((this.onAddPersonCompletedDelegate == null))
     {
         this.onAddPersonCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnAddPersonCompleted);
     }
     base.InvokeAsync(this.onBeginAddPersonDelegate, new object[] {
         newPerson
     }, this.onEndAddPersonDelegate, this.onAddPersonCompletedDelegate, userState);
 }
示例#4
0
 public void UpdatePersonAsync(string lastName, Common.Person updatedPerson, object userState)
 {
     if ((this.onBeginUpdatePersonDelegate == null))
     {
         this.onBeginUpdatePersonDelegate = new BeginOperationDelegate(this.OnBeginUpdatePerson);
     }
     if ((this.onEndUpdatePersonDelegate == null))
     {
         this.onEndUpdatePersonDelegate = new EndOperationDelegate(this.OnEndUpdatePerson);
     }
     if ((this.onUpdatePersonCompletedDelegate == null))
     {
         this.onUpdatePersonCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnUpdatePersonCompleted);
     }
     base.InvokeAsync(this.onBeginUpdatePersonDelegate, new object[] {
         lastName,
         updatedPerson
     }, this.onEndUpdatePersonDelegate, this.onUpdatePersonCompletedDelegate, userState);
 }
        public ActionResult AddNextOfKin(Common.NextOfKin nok, Common.Person personNOK, string txtStreetNOK, string txtPropertyNOK, Guid?localityNOK, Guid?streetNOK)
        {
            BusinessLayer.PatientsBL patient = new BusinessLayer.PatientsBL();

            try
            {
                //nok.PatientId_fk = Int32.Parse(PatientIds);

                patient.RegisterPerson(personNOK, txtStreetNOK, txtPropertyNOK, localityNOK, streetNOK);
                nok.Personfk = personNOK.PersonID;
                patient.AddNextOfKin(nok);
            }
            catch (Exception ex)
            {
                throw ex;
            }

            return(Json(null, JsonRequestBehavior.AllowGet));
        }
示例#6
0
        public async Task <ActorObject> Transform(UserProfileModel privateModel, long peerId, int?viewerId)
        {
            if (privateModel != null)
            {
                if (peerId > 0)
                {
                    throw new NotSupportedException();
                }

                var asPublic = new Common.Person();
                asPublic.PublicId.Copy(privateModel.PublicId);
                asPublic.PeerId     = peerId;
                asPublic.BanExpires = privateModel.BanExpires;
                asPublic.BanReason  = privateModel.BanReason;
                asPublic.summary    = privateModel.Bio;
                // asPublic.BioVisibility = privateModel.BioVisibility;
                asPublic.name  = privateModel.DisplayName;
                asPublic.Email = privateModel.Email;
                // this.EmailVisibility = user.EmailVisibility;
                asPublic.Handle = privateModel.Handle;
                // asPublic.audience = privateModel.Visibility.ToAudience(asPublic).IntoNewList<BaseObject>().ToCollection();
                asPublic.published        = privateModel.WhenCreated;
                asPublic.WhenLastLoggedIn = privateModel.WhenLastLoggedIn;
                // asPublic.WhenLastLoggedInVisibility = privateModel.WhenLastLoggedInVisibility;
                asPublic.WhenLastOnline = privateModel.WhenLastOnline;
                // asPublic.WhenLastOnlineVisibility = privateModel.WhenLastOnlineVisibility;
                asPublic.updated = privateModel.WhenLastUpdated;

                asPublic.PrivateModel = privateModel;

                await Task.Delay(1);

                return(asPublic);
            }
            return(null);
        }
 public void UpdatePerson(string lastName, Common.Person updatedPerson)
 {
     base.Channel.UpdatePerson(lastName, updatedPerson);
 }
 public System.Threading.Tasks.Task AddPersonAsync(Common.Person newPerson)
 {
     return(base.Channel.AddPersonAsync(newPerson));
 }
 public void AddPerson(Common.Person newPerson)
 {
     base.Channel.AddPerson(newPerson);
 }
示例#10
0
 public void UpdatePersonAsync(string lastName, Common.Person updatedPerson)
 {
     this.UpdatePersonAsync(lastName, updatedPerson, null);
 }
        public ActionResult AddPatient(Common.Doctor d, Common.DiagnosisPatient dp, Common.PatientsEmployee pe, Common.Patient pat, Common.Person per, string txtStreetP, string txtPropertyP, Guid?locality, Guid?street, string txtOnc, Guid?ddOnc, string txtCon, Guid?ddCon, string txtFD, Guid?ddFD)
        {
            BusinessLayer.PatientsBL patient = new BusinessLayer.PatientsBL();
            try
            {
                if (per.IdCardNumber != null)
                {
                    if (patient.CheckRegister(per.IdCardNumber))
                    {
                        patient.RegisterPerson(per, txtStreetP, txtPropertyP, locality, street);
                        pat.Personfk = per.PersonID;
                        patient.RegisterPatient(pat);
                        if (pe.EmployeeId_fk != Guid.Empty)
                        {
                            patient.AddKeyWorker(pe);
                        }
                        if (dp.DiagnosisType_fk != Guid.Empty && dp.DiagnosisType_fk != null)//Issue Fix it
                        {
                            patient.AddDiagnosis(dp);
                        }

                        patient.AddDoctor(d, txtCon, txtOnc, txtFD, ddCon, ddFD, ddOnc);
                    }
                }
                else
                {
                    patient.RegisterPerson(per, txtStreetP, txtPropertyP, locality, street);
                    pat.Personfk = per.PersonID;
                    patient.RegisterPatient(pat);
                    if (pe.EmployeeId_fk != Guid.Empty)
                    {
                        patient.AddKeyWorker(pe);
                    }
                    if (dp.DiagnosisType_fk != Guid.Empty && dp.DiagnosisType_fk != null)//Issue Fix it
                    {
                        patient.AddDiagnosis(dp);
                    }

                    patient.AddDoctor(d, txtCon, txtOnc, txtFD, ddCon, ddFD, ddOnc);
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            return(Json("Valid", JsonRequestBehavior.AllowGet));
        }
示例#12
0
 public void AddPersonAsync(Common.Person newPerson)
 {
     this.AddPersonAsync(newPerson, null);
 }
示例#13
0
 private System.IAsyncResult OnBeginAddPerson(object[] inValues, System.AsyncCallback callback, object asyncState)
 {
     Common.Person newPerson = ((Common.Person)(inValues[0]));
     return(this.BeginAddPerson(newPerson, callback, asyncState));
 }
示例#14
0
 public System.IAsyncResult BeginAddPerson(Common.Person newPerson, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginAddPerson(newPerson, callback, asyncState));
 }
 public System.Threading.Tasks.Task UpdatePersonAsync(string lastName, Common.Person updatedPerson)
 {
     return(base.Channel.UpdatePersonAsync(lastName, updatedPerson));
 }
示例#16
0
 public System.IAsyncResult BeginUpdatePerson(string lastName, Common.Person updatedPerson, System.AsyncCallback callback, object asyncState)
 {
     return(base.Channel.BeginUpdatePerson(lastName, updatedPerson, callback, asyncState));
 }
示例#17
0
 public Common.Person[] Join(Common.Person name)
 {
     return(base.Channel.Join(name));
 }