Ejemplo n.º 1
0
 public bool UpdateWorkTime( string userMail, IWorkTime workTime, string projectDescription )
 {
     return dataManagement.AssignWorkTimeToUser( userMail, workTime.Id, projectDescription );
 }
 IWorkTime UpdateWorkTime(String userMail, IWorkTime workTime, String projectDescription);
        public bool WriteWorkTime(IWorkTime workTime)
        {
            if( File.Exists(pathWorkTime) )
            {
                File.Delete(pathWorkTime);
            }

            var sw = File.CreateText(pathWorkTime);
            sw.Write(Jsonizer<List<WorkTime>>.Serialize(WorkTimeList));
            sw.Flush();
            sw.Close();
            return true;
        }
Ejemplo n.º 4
0
        public bool WriteWorkTime( IWorkTime workTime )
        {
            var wt = database.WorkTimes.Where( o => o.Id == workTime.Id ).FirstOrDefault();

            if ( wt != null )
            {
                wt.IstAbrechenbar = workTime.IstAbrechenbar;
                wt.IstReisezeit = workTime.IstReisezeit;
                wt.Anfang = workTime.Anfang;
                wt.Ende = workTime.Ende;
            }

            database.WorkTimes.Add( ( WorkTime )workTime );
            database.SaveChanges();
            return true;
        }