예제 #1
0
        public void AddNewTreatment(Treatment treatment)
        {
            //local
            //Keep count for Sychronization
            long number = sqlite.AddNewTreatment(treatment.Name, treatment.Price);

            DAOCount++;
            sqlite.UpdateCountRecordSQlite(DAOCount);

            //firease
            if (!IsWorkOffline)
            {
                FBCount++;
                firebaseDAO.UpdateCountRecordFB(FBCount);
                treatment.ID = (int)number;
                firebaseDAO.AddNewTreatment(treatment);
            }
        }