private static void LoadInfoProvider(RadicacionViewModel radicacionViewModel, string userNitLogged, bdFacturacionElectronicaEntities entities)
        {
            tblUsuariosProveedor userProvider = entities.tblUsuariosProveedor.Where(u => u.UsuarioNit == userNitLogged).FirstOrDefault();

            radicacionViewModel.UserNit     = userProvider.UsuarioNit;
            radicacionViewModel.RazonSocial = userProvider.RazonSocial;
        }
 public ActionResult RadicarSoporte(RadicacionViewModel radicacionViewModel)
 {
     try
     {
         string userNitLogged = HttpContext.User.Identity.Name;
         using (bdFacturacionElectronicaEntities entities = new bdFacturacionElectronicaEntities())
         {
             LoadInfoProvider(radicacionViewModel, userNitLogged, entities);
             LoadCompaniesByProvider(userNitLogged, entities);
             LoadOrdersType(userNitLogged, entities);
         }
     }
     catch (DbEntityValidationException)
     {
         GenerateAlert("error", "error", "validación de modelo", string.Empty);
     }
     catch (Exception exception)
     {
         GenerateAlert("error", "error", exception.Message, string.Empty);
     }
     return(View(radicacionViewModel));
 }