Esempio n. 1
0
 public string Export(WorkMonth wmonth)
 {
     var month = new MonapiMonth();
     month.Nummer = this.monlistUserNUmber;
     month.Jahr = wmonth.Year;
     month.Monat = wmonth.Month;
     var items = new List<MonapiWorkItem>();
     foreach (var day in wmonth.Days)
     {
         foreach (var item in day.Items)
         {
             items.Add(new MonapiWorkItem(item));
         }
     }
     month.Stunden = items;
     var serializedObject = JsonConvert.SerializeObject(month, Formatting.Indented);
     return serializedObject;
 }
Esempio n. 2
0
        public string Export(WorkMonth wmonth)
        {
            var month = new MonapiMonth();

            month.Nummer = this.monlistUserNUmber;
            month.Jahr   = wmonth.Year;
            month.Monat  = wmonth.Month;
            var items = new List <MonapiWorkItem>();

            foreach (var day in wmonth.Days)
            {
                foreach (var item in day.Items)
                {
                    items.Add(new MonapiWorkItem(item));
                }
            }
            month.Stunden = items;
            var serializedObject = JsonConvert.SerializeObject(month, Formatting.Indented);

            return(serializedObject);
        }