Beispiel #1
0
        public long AddNewTreatmentPlan(string customerID, int state, string creationDate, string treatmentPlanCompleteDate)
        {
            //Keep count for Sychronization
            DAOCount++;

            sqlite.UpdateCountRecordSQlite(DAOCount);


            // add to sql
            int id = (int)sqlite.AddNewTreatmentPlan(customerID, state, creationDate, treatmentPlanCompleteDate);



            //firease
            if (!IsWorkOffline)
            {
                FBCount++;
                firebaseDAO.UpdateCountRecordFB(FBCount);
                //add to firebase
                firebaseDAO.AddNewTreatmentPlan(id, customerID, state, creationDate, treatmentPlanCompleteDate);
            }

            return(id);
        }