Exemplo n.º 1
0
 ///<summary>Only run on server for mobile.  Takes the list of changes from the dental office and makes updates to those items in the mobile server db.  Also, make sure to run DeletedObjects.DeleteForMobile().</summary>
 public static void UpdateFromChangeList(List <Appointmentm> list, long customerNum)
 {
     for (int i = 0; i < list.Count; i++)
     {
         list[i].CustomerNum = customerNum;
         Appointmentm appointmentm = Crud.AppointmentmCrud.SelectOne(customerNum, list[i].AptNum);
         if (appointmentm == null)                       //not in db
         {
             Crud.AppointmentmCrud.Insert(list[i], true);
         }
         else
         {
             Crud.AppointmentmCrud.Update(list[i]);
         }
     }
 }
		protected void Page_Load(object sender,EventArgs e) {
			try {
				CustomerNum=util.GetCustomerNum(Message);
				if(CustomerNum==0) {
					return;
				}
				if(Request["AptNum"]!=null) {
					Int64.TryParse(Request["AptNum"].ToString().Trim(),out AptNum);
				}
				apt=Appointmentms.GetOne(CustomerNum,AptNum);
				pat=Patientms.GetOne(CustomerNum,apt.PatNum);
				PatName=util.GetPatientName(pat);
			}
			catch(Exception ex) {
				LabelError.Text=Util.ErrorMessage;
				Logger.LogError(ex);
			}
		}
		public string GetApptBrokenStatus(Appointmentm ap) {
			if(ap.AptStatus==ApptStatus.Broken){
				return @"<div style=""font-style: italic;color: #FF0000;font-weight:normal"">Broken</div>";
			}
			return "";
		}
		public string GetProviderColor(Appointmentm ap) {
			string HexColor="#FFFFFF";
			try {
				Providerm pv;
				if(ap.AptStatus==ApptStatus.Complete) {
					return "#808080"; //gray
				}
				if(ap.IsHygiene) {
					if(ap.ProvHyg==0) { //no hygenist
						return HexColor;
					}
					pv=Providerms.GetOne(CustomerNum,ap.ProvHyg);
				}else{
					pv=Providerms.GetOne(CustomerNum,ap.ProvNum);
				}
				if(pv!=null) {
					HexColor=ColorTranslator.ToHtml(pv.ProvColor);
				}
				return HexColor;
			}
			catch(Exception ex) {
				Logger.LogError("CustomerNum="+CustomerNum+ " ap.ProvNum="+ap.ProvNum,ex);
				return HexColor;
			}
		}
Exemplo n.º 5
0
 /// <remarks/>
 public void SynchAppointmentsAsync(string RegistrationKey, Appointmentm[] appointmentList, object userState) {
     if ((this.SynchAppointmentsOperationCompleted == null)) {
         this.SynchAppointmentsOperationCompleted = new System.Threading.SendOrPostCallback(this.OnSynchAppointmentsOperationCompleted);
     }
     this.InvokeAsync("SynchAppointments", new object[] {
                 RegistrationKey,
                 appointmentList}, this.SynchAppointmentsOperationCompleted, userState);
 }
Exemplo n.º 6
0
 /// <remarks/>
 public void SynchAppointmentsAsync(string RegistrationKey, Appointmentm[] appointmentList) {
     this.SynchAppointmentsAsync(RegistrationKey, appointmentList, null);
 }
Exemplo n.º 7
0
 public void SynchAppointments(string RegistrationKey, Appointmentm[] appointmentList) {
     this.Invoke("SynchAppointments", new object[] {
                 RegistrationKey,
                 appointmentList});
 }