Advertisement
Guest User

Untitled

a guest
Sep 26th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.53 KB | None | 0 0
  1. using DAL.Model.BaseModel;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Linq;
  5. using System.Text;
  6. using System.Threading.Tasks;
  7.  
  8. namespace DAL.Model.BaseModel
  9. {
  10.     public static class Extensions
  11.     {
  12.         public static string Name(this AbsenceType state)
  13.         {
  14.             switch (state)
  15.             {
  16.                 case AbsenceType.Late:
  17.                     return "Atraso";
  18.                 case AbsenceType.Presence:
  19.                     return "Presença";
  20.                 case AbsenceType.Material:
  21.                     return "Material";
  22.                 case AbsenceType.BadBehaviour:
  23.                     return "Mau Comportamento";
  24.             }
  25.             return null;
  26.         }
  27.  
  28.         public static string Name(this AbsenceState state)
  29.         {
  30.             switch (state)
  31.             {
  32.                 case AbsenceState.Sent:
  33.                     return "Enviado";
  34.                 case AbsenceState.Seen:
  35.                     return "Visto";
  36.                 case AbsenceState.Justified:
  37.                     return "Justificado";
  38.             }
  39.             return null;
  40.         }
  41.  
  42.         public static string Name(this ErrandState state)
  43.         {
  44.             switch (state)
  45.             {
  46.                 case ErrandState.Sent:
  47.                     return "Enviado";
  48.                 case ErrandState.Seen:
  49.                     return "Visto";
  50.                 case ErrandState.Signed:
  51.                     return "Assinado";
  52.             }
  53.             return null;
  54.         }
  55.     }
  56. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement