Exemple #1
0
        public bool guardarDB(in_Producto_imagenes_Info info)
        {
            try
            {
                using (EntitiesInventario Context = new EntitiesInventario())
                {
                    in_Producto_imagenes Entity = new in_Producto_imagenes
                    {
                        IdEmpresa  = info.IdEmpresa,
                        IdProducto = info.IdProducto,
                        Secuencia  = info.Secuencia = 1,
                        Imagen     = info.Imagen
                    };
                    Context.in_Producto_imagenes.Add(Entity);
                    Context.SaveChanges();
                }

                return(true);
            }
            catch (Exception ex)
            {
                string mensaje = "";
                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);
                oDataLog.Guardar_Log_Error(Log_Error_sis, ref mensaje);
                mensaje = ex.ToString() + " " + ex.Message;
                throw new Exception(ex.ToString());
            }
        }
 public bool guardarDB(in_Producto_imagenes_Info info)
 {
     try
     {
         return(odata.guardarDB(info));
     }
     catch (Exception ex)
     {
         Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message);
         throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "guardarDB", ex.Message), ex)
               {
                   EntityType = typeof(in_Producto_imagenes_Bus)
               };
     }
 }