using Exferia_Aplicacion.General;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Text;
using System.Threading.Tasks;
using static Exferia_Aplicacion.General.Enumerados;

namespace Exferia_EntityFramework.Script_Actualizacion
{
    public class Scripts_Iniciales
    {
        public static string CreacionBD
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_CreacionBD;
                    obj_Assembly_CreacionBD = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_CreacionBD.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.CreacionBD.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

        public static string ProcedimentosAlmacenado_Privados
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {
                    
                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.PA_Privados.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }  
                }

                return str_ValorDevuelto;
            }
        }

        public static string ProcedimentosAlmacenado_CRM
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.PA_CRM.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

        public static string Tablas_Opciones
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.Tablas_Opciones.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

        public static string Tablas_Usuarios
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.Tablas_Usuarios.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

        public static string Tablas_Informes
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.Tablas_Informes.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

        public static string Tablas_Control
        {
            get
            {
                string str_ValorDevuelto = "";
                StreamReader obj_StreamReader = null;
                try
                {

                    Assembly obj_Assembly_PA_Privados;
                    obj_Assembly_PA_Privados = Assembly.GetExecutingAssembly();
                    obj_StreamReader = new StreamReader(obj_Assembly_PA_Privados.GetManifestResourceStream("Exferia_EntityFramework.Script_Iniciales.Tablas_Control.txt"));

                    str_ValorDevuelto = obj_StreamReader.ReadToEnd();
                }
                catch (Exception)
                { }
                finally
                {
                    if (obj_StreamReader != null)
                    {
                        obj_StreamReader.Close();
                        obj_StreamReader.Dispose();
                    }
                }

                return str_ValorDevuelto;
            }
        }

    }
} 
