Exemplo n.º 1
0
        public void LoadByContactId(int ContactId)
        {
            DataSet ds = new atriumDB();

            PreRefresh();
            myA.GetAttendee().PreRefresh();

            if (myA.AtMng.AppMan.UseService)
            {
                ds = BEManager.DecompressDataSet(myA.AtMng.AppMan.AtriumX().AppointmentLoadByContactId(ContactId, myA.AtMng.AppMan.AtriumXCon), ds);
            }
            else
            {
                try
                {
                    ds = BEManager.DecompressDataSet(myDAL.LoadAllForOfficer(ContactId), ds);
                }
                catch (System.Runtime.Serialization.SerializationException x)
                {
                    RecoverDAL();
                    ds = BEManager.DecompressDataSet(myDAL.LoadAllForOfficer(ContactId), ds);
                }
            }
            Fill(ds.Tables["Appointment"]);
            myA.GetApptRecurrence().Fill(ds.Tables["ApptRecurrence"]);
            myA.GetAttendee().Fill(ds.Tables["Attendee"]);
            SetLocalDates();
            ds.Clear();
            ds.Dispose();
        }