Ejemplo n.º 1
0
 internal static async Task <List <Tables.Localization.Page> > List(Guid pageId)
 {
     await using var cmd = new SqlCommand("[Localization].[GetPages]", new Base().SqlConnection)
                 {
                     CommandType = CommandType.StoredProcedure
                 };
     cmd.Parameters.Add("@PageId", SqlDbType.UniqueIdentifier).Value = pageId;
     using var sda = new SqlDataAdapter(cmd);
     return(Object.GetList <Tables.Localization.Page>(sda));
 }
Ejemplo n.º 2
0
 internal static async Task <List <Tables.Upload.Client> > List(Guid?clientId)
 {
     await using var cmd = new SqlCommand("[Upload].[GetClients]", new Base().SqlConnection)
                 {
                     CommandType = CommandType.StoredProcedure
                 };
     cmd.Parameters.Add("@ClientId", SqlDbType.UniqueIdentifier).Value = clientId;
     using var sda = new SqlDataAdapter(cmd);
     return(Object.GetList <Tables.Upload.Client>(sda));
 }
Ejemplo n.º 3
0
 internal static async Task <List <Tables.Localization.Testimonial> > List(string site)
 {
     await using var cmd = new SqlCommand("[Localization].[GetTestimonialsForSite]", new Base().SqlConnection)
                 {
                     CommandType = CommandType.StoredProcedure
                 };
     cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site;
     using var sda = new SqlDataAdapter(cmd);
     return(Object.GetList <Tables.Localization.Testimonial>(sda));
 }
Ejemplo n.º 4
0
 internal static async Task <List <Tables.dbo.Client> > List(string site)
 {
     await using var cmd = new SqlCommand("[dbo].[GetClients]", new Base().SqlConnection)
                 {
                     CommandType = CommandType.StoredProcedure
                 };
     cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site;
     using var sda = new SqlDataAdapter(cmd);
     return(Object.GetList <Tables.dbo.Client>(sda));
 }
        internal static async Task <Tables.Log.Inquiry> Item(Guid?id)
        {
            await using var cmd = new SqlCommand("[Log].[GetInquiry]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@Id", SqlDbType.UniqueIdentifier).Value = id;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.Log.Inquiry>(sda));
        }
Ejemplo n.º 6
0
 internal static async Task <List <Tables.dbo.Testimonial> > List(string site, bool approved)
 {
     await using var cmd = new SqlCommand("[dbo].[GetTestimonialsForSiteApproved]", new Base().SqlConnection)
                 {
                     CommandType = CommandType.StoredProcedure
                 };
     cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value         = site;
     cmd.Parameters.Add("@Approved", SqlDbType.UniqueIdentifier).Value = approved;
     using var sda = new SqlDataAdapter(cmd);
     return(Object.GetList <Tables.dbo.Testimonial>(sda));
 }
Ejemplo n.º 7
0
        internal static async Task <Tables.dbo.Client> Item(string emailAddress)
        {
            await using var cmd = new SqlCommand("[dbo].[GetClientByEmailAddress]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@EmailAddress", SqlDbType.NVarChar, 256).Value = emailAddress;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.dbo.Client>(sda));
        }
Ejemplo n.º 8
0
        internal static async Task <Tables.dbo.Image> DefaultTestimonial(string site)
        {
            await using var cmd = new SqlCommand("[dbo].[GetImageDefaultTestimonial]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.dbo.Image>(sda));
        }
Ejemplo n.º 9
0
        internal static async Task <Tables.dbo.Testimonial> Item(Guid siteId, Guid workId)
        {
            await using var cmd = new SqlCommand("[dbo].[GetTestimonialBySiteIdWorkId]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@SiteId", SqlDbType.UniqueIdentifier).Value = siteId;
            cmd.Parameters.Add("@WorkId", SqlDbType.UniqueIdentifier).Value = workId;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.dbo.Testimonial>(sda));
        }
Ejemplo n.º 10
0
        internal static async Task <Tables.Upload.Client> Item(Guid?clientId, string originalFilename)
        {
            await using var cmd = new SqlCommand("[Upload].[GetClientByClientIdOriginalFilename]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@ClientId", SqlDbType.UniqueIdentifier).Value      = clientId;
            cmd.Parameters.Add("@OriginalFilename", SqlDbType.NVarChar, 256).Value = originalFilename;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.Upload.Client>(sda));
        }
Ejemplo n.º 11
0
        internal static async Task <Tables.dbo.Image> Item(string site, string path)
        {
            await using var cmd = new SqlCommand("[dbo].[GetImageBySitePath]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value   = site;
            cmd.Parameters.Add("@Path", SqlDbType.NVarChar, 4440).Value = path;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.dbo.Image>(sda));
        }
Ejemplo n.º 12
0
        internal static async Task <Tables.dbo.Page> Item(string site, int areaId, string name)
        {
            await using var cmd = new SqlCommand("[dbo].[GetPageBySiteAreaIdName]", new Base().SqlConnection)
                        {
                            CommandType = CommandType.StoredProcedure
                        };

            cmd.Parameters.Add("@Site", SqlDbType.NVarChar, 25).Value = site;
            cmd.Parameters.Add("@AreaId", SqlDbType.Int).Value        = areaId;
            cmd.Parameters.Add("@Enum", SqlDbType.NVarChar, 50).Value = name;
            using var sda = new SqlDataAdapter(cmd);
            return(Object.GetItem <Tables.dbo.Page>(sda));
        }