Example #1
0
 public bool AnularDB(fa_notaCredDeb_aca_Info info, ref string mensaje)
 {
     try
     {
         using (Entities_Academico Base = new Entities_Academico())
         {
             var address = Base.fa_notaCredDeb_aca.FirstOrDefault(o => o.IdInstitucion == info.IdInstitucion && o.IdNotaCredDeb == info.IdNotaCredDeb);
             if (address != null)
             {
                 Base.SaveChanges();
                 mensaje = "Se ha procedido actualizar el periodo lectivo exitosamente ";
             }
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.InnerException + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = "Se ha producido el siguiente error: " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }
Example #2
0
 public bool Grabar(fa_notaCredDeb_aca_Info info, ref string mensaje)
 {
     try
     {
         using (Entities_Academico Base = new Entities_Academico())
         {
             fa_notaCredDeb_aca address = new fa_notaCredDeb_aca();
             address.IdEmpresa     = info.IdEmpresa;
             address.IdSucursal    = info.IdSucursal;
             address.IdBodega      = info.IdBodega;
             address.IdNotaCredDeb = info.IdNotaCredDeb;
             address.IdInstitucion = info.IdInstitucion;
             address.IdEstudiante  = info.IdEstudiante;
             //address.IdTipoNota = info.IdTipoNota;
             address.Observaciones = "";
             //address.estado = info.estado;
             Base.fa_notaCredDeb_aca.Add(address);
             Base.SaveChanges();
             mensaje = "Se registro la asociacion de la Nota de Credito con el Estudiante";
         }
         return(true);
     }
     catch (Exception ex)
     {
         string arreglo = ToString();
         tb_sis_Log_Error_Vzen_Data oDataLog      = new tb_sis_Log_Error_Vzen_Data();
         tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now);
         mensaje = ex.InnerException + " " + ex.Message;
         oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
         mensaje = "Se ha producido el siguiente error: " + ex.Message;
         throw new Exception(ex.ToString());
     }
 }