Example #1
0
 public bool Execute()
 {
     StaffInsert.Equipo = EquipoStaff.IdEquipo;
     StaffInsert.Dni    = StaffInsert.Dni.ToUpper();
     ValidacionesRegexp.ValidarDniNie(StaffInsert.Dni);
     StaffInsert.Fecha_Nacimiento = FechaNacimiento.Year + "-" + FechaNacimiento.Month + "-" + FechaNacimiento.Day;
     if (!StaffInsert.Foto.Equals("/Assets/defecto.jpg"))
     {
         string[] rutaimagen = StaffInsert.Foto.Split('/');
         string   urlImagen  = BlobStorage.GuardarImagen(StaffInsert.Foto, rutaimagen[rutaimagen.Length - 1], StaffInsert);
         StaffInsert.Foto = urlImagen;
     }
     return(ApiRest.InsertStaff(StaffInsert));
 }