private OptionObject AppointmentEditDetails(OptionObject optionObject)
 {
     var systemCode = ConfigurationManager.AppSettings["SystemCode"].ToString();
     var username = ConfigurationManager.AppSettings["Username"].ToString();
     var password = ConfigurationManager.AppSettings["Password"].ToString();
     string appointmentStatusList = "&2&4&5&6&7&8&9&";
     var returnOptionObject = new OptionObject();
     var ClientField = new FieldObject { FieldNumber = "10010" };
     var EpisodeNumberField = new FieldObject { FieldNumber = "12345" };
     var AppointmentDateField = new FieldObject { FieldNumber = "22000" };
     var StaffField = new FieldObject { FieldNumber = "10003" };
     var AppointmentStartTimeField = new FieldObject { FieldNumber = "10107" };
     var AppointmentStatusField = new FieldObject { FieldNumber = "10005" };
     try
     {
         foreach (var field in optionObject.Forms.ElementAt(0).CurrentRow.Fields)
         {
             if (field.FieldNumber.Equals(ClientField.FieldNumber))
                 ClientField.FieldValue = field.FieldValue;
             if (field.FieldNumber.Equals(EpisodeNumberField.FieldNumber))
                 EpisodeNumberField.FieldValue = field.FieldValue;
             if (field.FieldNumber.Equals(AppointmentDateField.FieldNumber))
                 AppointmentDateField.FieldValue = field.FieldValue;
             if (field.FieldNumber.Equals(StaffField.FieldNumber))
                 StaffField.FieldValue = field.FieldValue;
             if (field.FieldNumber.Equals(AppointmentStartTimeField.FieldNumber))
                 AppointmentStartTimeField.FieldValue = field.FieldValue;
             if (field.FieldNumber.Equals(AppointmentStatusField.FieldNumber))
                 AppointmentStatusField.FieldValue = field.FieldValue;
         }
         if (appointmentStatusList.IndexOf(AppointmentStatusField.FieldValue) >= 0)
         {
             var appointments = AppointmentRepository.GetAppointment(ClientField.FieldValue,
                 EpisodeNumberField.FieldValue,
                 DateTime.Parse(AppointmentDateField.FieldValue),
                 StaffField.FieldValue,
                 DateTime.Parse(AppointmentStartTimeField.FieldValue));
             var WebSvcAppointmentObj = new AppointmentScheduling.AppointmentSchedulingObject();
             var WebSvcAppointment = new AppointmentScheduling.AppointmentScheduling();
             var SingleAppointment = new Appointment();
             SingleAppointment = appointments.ElementAt(0);
             WebSvcAppointmentObj.ApptDate = SingleAppointment.AppointmentDate;
             WebSvcAppointmentObj.ApptDateSpecified = true;
             WebSvcAppointmentObj.ApptStatus = SingleAppointment.StatusCode;
             WebSvcAppointmentObj.ClientID = SingleAppointment.ClientId;
             WebSvcAppointmentObj.Episode = Convert.ToInt64(SingleAppointment.EpisodeNumber);
             WebSvcAppointmentObj.EpisodeSpecified = true;
             WebSvcAppointmentObj.Site = SingleAppointment.SiteId;
             WebSvcAppointmentObj.ApptStartTime = SingleAppointment.StartTime;
             WebSvcAppointmentObj.ApptEndTime = SingleAppointment.EndTime;
             WebSvcAppointmentObj.ServiceCode = SingleAppointment.ScheduledServiceCode;
             WebSvcAppointmentObj.Program = SingleAppointment.ProgramCode;
             WebSvcAppointmentObj.NumberOfClients = "1";
             WebSvcAppointmentObj.ApptNotes = SingleAppointment.Notes;
             if (appointmentStatusList.IndexOf(SingleAppointment.StatusCode) >= 0)
             {
                 WebSvcAppointmentObj.MissedVisitSvcCode = getMissedVisitCode(SingleAppointment.StatusCode);
                 WebSvcAppointmentObj.MissedVisit = "X";
             }
             var response = WebSvcAppointment.UpdateAppointment(systemCode,
                 username,
                 password,
                 WebSvcAppointmentObj,
                 SingleAppointment.StaffId,
                 SingleAppointment.AppointmentId);
         }
     }
     catch (Exception e)
     {
     }
     returnOptionObject.EntityID = optionObject.EntityID;
     returnOptionObject.OptionId = optionObject.OptionId;
     returnOptionObject.Facility = optionObject.Facility;
     returnOptionObject.SystemCode = optionObject.SystemCode;
     return returnOptionObject;
 }
Example #2
0
 /// <remarks/>
 public void UpdateAppointmentAsync(string SystemCode, string UserName, string Password, AppointmentSchedulingObject AppointmentSchedulingInfo, string StaffID, string AppointmentSchedulingUniqueID, object userState) {
     if ((this.UpdateAppointmentOperationCompleted == null)) {
         this.UpdateAppointmentOperationCompleted = new System.Threading.SendOrPostCallback(this.OnUpdateAppointmentOperationCompleted);
     }
     this.InvokeAsync("UpdateAppointment", new object[] {
                 SystemCode,
                 UserName,
                 Password,
                 AppointmentSchedulingInfo,
                 StaffID,
                 AppointmentSchedulingUniqueID}, this.UpdateAppointmentOperationCompleted, userState);
 }
Example #3
0
 public WebServiceResponse AddAppointment(string SystemCode, string UserName, string Password, AppointmentSchedulingObject AppointmentSchedulingInfo, string StaffID) {
     object[] results = this.Invoke("AddAppointment", new object[] {
                 SystemCode,
                 UserName,
                 Password,
                 AppointmentSchedulingInfo,
                 StaffID});
     return ((WebServiceResponse)(results[0]));
 }
Example #4
0
 /// <remarks/>
 public void UpdateAppointmentAsync(string SystemCode, string UserName, string Password, AppointmentSchedulingObject AppointmentSchedulingInfo, string StaffID, string AppointmentSchedulingUniqueID) {
     this.UpdateAppointmentAsync(SystemCode, UserName, Password, AppointmentSchedulingInfo, StaffID, AppointmentSchedulingUniqueID, null);
 }