Ejemplo n.º 1
0
 public void ChangeDay(AttendanceMaster ArgDay)
 {
     Day       = ArgDay;
     DayStr    = ArgDay.WorkDate.ToString("MM月dd日(ddd)", new System.Globalization.CultureInfo("ja-JP"));
     StartTime = new TimeSpan(ArgDay.StartTime.Hour, ArgDay.StartTime.Minute, 0);
     EndTime   = new TimeSpan(ArgDay.EndTime.Hour, ArgDay.EndTime.Minute, 0);
 }
Ejemplo n.º 2
0
 //更新・追加
 public int SaveItem(AttendanceMaster item)
 {
     lock (Locker)
     {
         //ID <> 0の場合は更新
         if (item.ID != 0)
         {
             _db.Update(item);
             return(item.ID);
         }
         //追加
         return(_db.Insert(item));
     }
 }
Ejemplo n.º 3
0
        public AttendanceMaster GetDay(DateTime TargetDay)
        {
            if (Days.ContainsKey(TargetDay))
            {
                return(Days[TargetDay]);
            }
            else
            {
                AttendanceMaster a = new AttendanceMaster();
                a.UserID = this.UserName;
                Days.Add(TargetDay, a);

                a.WorkDate = TargetDay;

                return(a);
            }
        }