Esempio n. 1
0
        ///<Summary>Supply a datarow that contains all the database values needed for the appointment that is being added.</Summary>
        public void AddAppointment(DataRow row, DataTable tableApptFields, DataTable tablePatFields)
        {
            //if appointment is already on the pinboard, just select it.
            for (int i = 0; i < apptList.Count; i++)
            {
                if (apptList[i].DataRoww["AptNum"].ToString() == row["AptNum"].ToString())
                {
                    //Highlight it
                    selectedIndex          = i;
                    apptList[i].IsSelected = true;
                    Invalidate();
                    //throw new ApplicationException(Lan.g(this,"Appointment is already on the pinboard."));
                }
            }
            ContrApptSingle PinApptSingle = new ContrApptSingle();

            PinApptSingle.ThisIsPinBoard  = true;
            PinApptSingle.DataRoww        = row;
            PinApptSingle.TableApptFields = tableApptFields;
            PinApptSingle.TablePatFields  = tablePatFields;
            PinApptSingle.Size            = ApptSingleDrawing.SetSize(row);
            PinApptSingle.PatternShowing  = ApptSingleDrawing.GetPatternShowing(row["Pattern"].ToString());
            PinApptSingle.Width           = Width - 2;
            PinApptSingle.IsSelected      = true;
            PinApptSingle.Location        = new Point(0, 13 * apptList.Count);
            apptList.Add(PinApptSingle);
            selectedIndex = apptList.Count - 1;
            Invalidate();
        }
Esempio n. 2
0
 ///<summary>If an appt is already on the pinboard, and the information in it is change externally, this 'refreshes' the data.</summary>
 public void ResetData(DataRow row)
 {
     for (int i = 0; i < apptList.Count; i++)
     {
         if (apptList[i].DataRoww["AptNum"].ToString() == row["AptNum"].ToString())
         {
             apptList[i].DataRoww = row;
             apptList[i].Size     = ApptSingleDrawing.SetSize(row);
             apptList[i].Width    = Width - 2;
             //PinApptSingle.IsSelected=true;
             //PinApptSingle.Location=new Point(0,13*apptList.Count);
         }
     }
     Invalidate();
 }
Esempio n. 3
0
        ///<summary>Set all fields of this control. This is an alternative to constructing an entirely new instance.
        ///All uses of this control currently construct as Visible=false so that is the default here.</summary>
        public void ResetData(DataRow rowApt, DataTable tableApptFields, DataTable tablePatFields, Point location, bool visible = false)
        {
            DataRoww        = rowApt;
            TableApptFields = tableApptFields;
            TablePatFields  = tablePatFields;
            Pattern         = PIn.String(DataRoww["Pattern"].ToString());
            PatternShowing  = ApptSingleDrawing.GetPatternShowing(Pattern);
            Location        = location;
            Size            = ApptSingleDrawing.SetSize(Pattern);
            //These controls are always drawn as their Shadow bitmap.
            //They never actually render as a control.
            //Always set Visible to false here so that parent panel/form doesn't account for them when drawings it's controls.
            //In the case where it is a draggable control or on the pinboard, then it will be set to Visible=true.
            Visible = visible;
            //These are used heavily so deserialize here once to save time when accessing.
            AptNum           = PIn.Long(DataRoww["AptNum"].ToString());
            PatNum           = PIn.Long(DataRoww["PatNum"].ToString());
            AptDateTime      = PIn.DateT(DataRoww["AptDateTime"].ToString());
            OpNum            = PIn.Long(DataRoww["Op"].ToString());
            ClinicNum        = PIn.Long(DataRoww["ClinicNum"].ToString());
            ProvNum          = PIn.Long(DataRoww["ProvNum"].ToString());
            ProvHyg          = PIn.Long(DataRoww["ProvHyg"].ToString());
            Confirmed        = PIn.Long(DataRoww["Confirmed"].ToString());
            IsHygiene        = PIn.Bool(DataRoww["IsHygiene"].ToString());
            GrossProduction  = PIn.Decimal(DataRoww["productionVal"].ToString());
            WriteoffPPO      = PIn.Decimal(DataRoww["writeoffPPO"].ToString());
            AdjustmentTotal  = PIn.Decimal(DataRoww["adjustmentTotal"].ToString());
            ImageFolder      = PIn.String(DataRoww["ImageFolder"].ToString());
            PatientName      = PIn.String(DataRoww["patientName"].ToString());
            AptDate          = PIn.String(DataRoww["aptDate"].ToString());
            AptDay           = PIn.String(DataRoww["aptDay"].ToString());
            AptLength        = PIn.String(DataRoww["aptLength"].ToString());
            AptTime          = PIn.String(DataRoww["aptTime"].ToString());
            Email            = PIn.String(DataRoww["Email"].ToString());
            Language         = PIn.String(DataRoww["language"].ToString());
            ReferralTo       = PIn.String(DataRoww["referralTo"].ToString());
            ReferralFrom     = PIn.String(DataRoww["referralFrom"].ToString());
            ApptModNote      = PIn.String(DataRoww["apptModNote"].ToString());
            FamFinUrgNote    = PIn.String(DataRoww["famFinUrgNote"].ToString());
            AddrNote         = PIn.String(DataRoww["addrNote"].ToString());
            Insurance        = PIn.String(DataRoww["insurance"].ToString());
            ContactMethods   = PIn.String(DataRoww["contactMethods"].ToString());
            WirelessPhone    = PIn.String(DataRoww["wirelessPhone"].ToString());
            WkPhone          = PIn.String(DataRoww["wkPhone"].ToString());
            HmPhone          = PIn.String(DataRoww["hmPhone"].ToString());
            Age              = PIn.String(DataRoww["age"].ToString());
            BillingType      = PIn.String(DataRoww["billingType"].ToString());
            ChartNumber      = PIn.String(DataRoww["chartNumber"].ToString());
            Note             = PIn.String(DataRoww["Note"].ToString());
            Procs            = PIn.String(DataRoww["procs"].ToString());
            Lab              = PIn.String(DataRoww["lab"].ToString());
            MedUrgNote       = PIn.String(DataRoww["MedUrgNote"].ToString());
            PreMedFlag       = PIn.String(DataRoww["preMedFlag"].ToString());
            ConfirmedFromDef = PIn.String(DataRoww["confirmed"].ToString());
            Production       = PIn.String(DataRoww["production"].ToString());
            Provider         = PIn.String(DataRoww["provider"].ToString());
            ApptStatus aptStatus;

            if (Enum.TryParse(PIn.String(DataRoww["AptStatus"].ToString()), out aptStatus))
            {
                AptStatus = aptStatus;
            }
            else
            {
                AptStatus = ApptStatus.None;
            }
            ApptPriority priority;

            if (Enum.TryParse(PIn.String(DataRoww["Priority"].ToString()), out priority))
            {
                Priority = priority;
            }
            else
            {
                Priority = ApptPriority.Normal;
            }
        }