public static tppointstatu[] GetAllPpointStatus()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.tppointstatus.ToArray());
     }
 }
Example #2
0
        public static System.Collections.Generic.IEnumerable <ChannelPpointAccessInfo> GetAllChannelsByPPoint(string PPointid)
        {
            int PPointIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var dbQuery = from edcha in context.tchannel_ppoint
                                  join ed in context.tppoints on edcha.ID_PPOINT equals ed.ID_PPOINT
                                  join ch in context.channels on edcha.ID_CHANNEL equals ch.id
                                  where edcha.ID_PPOINT == PPointIdentifier
                                  select
                                  new ChannelPpointAccessInfo()
                    {
                        id        = ch.id,
                        name      = ch.name,
                        ID_PPOINT = ed.ID_PPOINT,
                        IIS_NAME  = ed.IIS_NAME,
                        URL       = ed.URL,
                        AMS_URL   = ed.AMS_URL
                    };

                    return(dbQuery.AsEnumerable().ToArray());
                }
            }
            return(null);
        }
 public static tencoderdevice[] GetEncoderdevices()
 {
     using (vooEntities context = new vooEntities())
     {
         return context.tencoderdevices.ToArray();
     }
 }
 public static tppoint[] GetPPoints()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.tppoints.ToArray());
     }
 }
 public static tencoderdevice[] GetEncoderdevices()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.tencoderdevices.ToArray());
     }
 }
Example #6
0
 public static tchannel_ppoint[] GetChannel_Ppoints()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.tchannel_ppoint.ToArray());
     }
 }
 public static channel[] GetChannels()
 {
     using (vooEntities context = new vooEntities())
     {
         return context.channels.ToArray();
     }
 }
Example #8
0
 public static tdevicechannelaccess[] GetDeviceChannelAccess()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.tdevicechannelaccesses.ToArray());
     }
 }
Example #9
0
 public static channel[] GetChannels()
 {
     using (vooEntities context = new vooEntities())
     {
         return(context.channels.ToArray());
     }
 }
        public static System.Collections.Generic.IEnumerable<ChannelPpointAccessInfo> GetAllPPointsbyChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var dbQuery = from edcha in context.tchannel_ppoint
                                  join ed in context.tppoints on edcha.ID_PPOINT equals ed.ID_PPOINT
                                  join ch in context.channels on edcha.ID_CHANNEL equals ch.id
                                  where edcha.ID_CHANNEL == channelIdentifier
                                  select
                                      new ChannelPpointAccessInfo()
                                          {
                                              id = ch.id,
                                              name = ch.name,
                                              ID_PPOINT = ed.ID_PPOINT,
                                              IIS_NAME = ed.IIS_NAME,
                                              URL = ed.URL,
                                              AMS_URL = ed.AMS_URL
                                          };

                    return dbQuery.AsEnumerable().ToArray();

                }
            }
            return null;
        }
 public static tppoint[] GetPPoints()
 {
     using (vooEntities context = new vooEntities())
     {
         return context.tppoints.ToArray();
     }
 }
        public static tencoderdevice UpdateEncoderDevice(tencoderdevice post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return(post);
        }
        public static tencoderdevice CreateEncoderDevice(tencoderdevice post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tencoderdevices.Add(post);
                context.SaveChanges();
            }

            return(post);
        }
Example #14
0
        public static channel UpdateChannel(channel post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return(post);
        }
        public static tdevicechannelaccess CreateDeviceChannelAccess(tdevicechannelaccess post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tdevicechannelaccesses.Add(post);
                context.SaveChanges();
            }

            return post;
        }
Example #16
0
        public static channel CreateChannel(channel post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.channels.Add(post);
                context.SaveChanges();
            }

            return(post);
        }
Example #17
0
        public static tdevicechannelaccess CreateDeviceChannelAccess(tdevicechannelaccess post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tdevicechannelaccesses.Add(post);
                context.SaveChanges();
            }

            return(post);
        }
        public static tppoint UpdatePPoint(tppoint post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return post;
        }
        public static tchannel_ppoint CreateChannelPPointAccess(tchannel_ppoint post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tchannel_ppoint.Add(post);
                context.SaveChanges();
            }

            return post;
        }
        public static tppointstatu CreatePPointStatus(tppointstatu post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tppointstatus.Add(post);
                context.SaveChanges();
            }

            return(post);
        }
        public static tppointstatu UpdatePPointStatus(tppointstatu post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return(post);
        }
Example #22
0
        public static tdevicechannelaccess UpdateDeviceChannelAccess(tdevicechannelaccess post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return(post);
        }
        public static tencoderdevice UpdateEncoderDevice(tencoderdevice post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return post;
        }
        public static tencoderdevice CreateEncoderDevice(tencoderdevice post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tencoderdevices.Add(post);
                context.SaveChanges();
            }

            return post;
        }
        public static channel CreateChannel(channel post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.channels.Add(post);
                context.SaveChanges();
            }

            return post;
        }
Example #26
0
        public static tchannel_ppoint UpdateChannelPPointAccess(tchannel_ppoint post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return(post);
        }
        public static tppoint CreatePPoint(tppoint post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tppoints.Add(post);
                context.SaveChanges();
            }

            return post;
        }
        public static channel UpdateChannel(channel post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return post;
        }
Example #29
0
        public static tchannel_ppoint CreateChannelPPointAccess(tchannel_ppoint post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.tchannel_ppoint.Add(post);
                context.SaveChanges();
            }

            return(post);
        }
        public static List<tppoint> SearchPPointByName(string ppointName)
        {
            using (vooEntities context = new vooEntities())
            {
                var query = from ppoint in context.tppoints
                            where ppoint.IIS_NAME.Contains(ppointName)
                            select ppoint;

              return query.ToList();
            }
        }
        public static List <tppoint> SearchPPointByName(string ppointName)
        {
            using (vooEntities context = new vooEntities())
            {
                var query = from ppoint in context.tppoints
                            where ppoint.IIS_NAME.Contains(ppointName)
                            select ppoint;

                return(query.ToList());
            }
        }
Example #32
0
        public static channel GetChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    return(context.channels.FirstOrDefault(post => post.id == channelIdentifier));
                }
            }

            return(null);
        }
        public static tencoderdevice Getencoderdevice(string deviceid)
        {
            int deviceIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    return(context.tencoderdevices.FirstOrDefault(post => post.ID_ENCODERDEVICE == deviceIdentifier));
                }
            }

            return(null);
        }
        public static tppoint GetPPoint(string PPointid)
        {
            int PPointIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    return context.tppoints.FirstOrDefault(post => post.ID_PPOINT == PPointIdentifier);
                }
            }

            return null;
        }
        public static channel GetChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    return context.channels.FirstOrDefault(post => post.id == channelIdentifier);
                }
            }

            return null;
        }
        public static tencoderdevice Getencoderdevice(string deviceid)
        {
            int deviceIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier) )
            {
                using (vooEntities context = new vooEntities())
                {
                    return context.tencoderdevices.FirstOrDefault(post => post.ID_ENCODERDEVICE == deviceIdentifier);
                }
            }

            return null;
        }
        public static tppointstatu GetPpointstatus(string PPointid)
        {
            int PPointStatusIdentifier;

            if (int.TryParse(PPointid, out PPointStatusIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    return(context.tppointstatus.FirstOrDefault(post => post.ID_STATUS == PPointStatusIdentifier));
                }
            }

            return(null);
        }
Example #38
0
        public static tdevicechannelaccess GetDeviceChannelAccess(string deviceid, string channelid)
        {
            int deviceIdentifier;
            int channelIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    return(context.tdevicechannelaccesses.FirstOrDefault(post => post.ID_DEVICE == deviceIdentifier && (post.ID_CHANNEL == channelIdentifier)));
                }
            }

            return(null);
        }
Example #39
0
        public static tchannel_ppoint GetChannel_Ppoint(string PPointid, string channelid)
        {
            int PPointIdentifier;
            int channelIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    return
                        (context.tchannel_ppoint.FirstOrDefault(
                             post => post.ID_PPOINT == PPointIdentifier && (post.ID_CHANNEL == channelIdentifier)));
                }
            }

            return(null);
        }
        public static void DeleteEncoderDevice(string deviceid)
        {
            int deviceIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tencoderdevices.FirstOrDefault(post => post.ID_ENCODERDEVICE == deviceIdentifier);
                    if (entity != null)
                    {
                        context.tencoderdevices.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static void DeleteEncoderDevice(string deviceid)
        {
            int deviceIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tencoderdevices.FirstOrDefault(post => post.ID_ENCODERDEVICE == deviceIdentifier);
                    if (entity != null)
                    {
                        context.tencoderdevices.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static void DeletePPointStatus(string PPointid)
        {
            int PPointStatusIdentifier;

            if (int.TryParse(PPointid, out PPointStatusIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tppointstatus.FirstOrDefault(post => post.ID_STATUS == PPointStatusIdentifier);
                    if (entity != null)
                    {
                        context.tppointstatus.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static void DeleteChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.channels.FirstOrDefault(post => post.id == channelIdentifier);
                    if (entity != null)
                    {
                        context.channels.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
Example #44
0
        public static void DeleteChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.channels.FirstOrDefault(post => post.id == channelIdentifier);
                    if (entity != null)
                    {
                        context.channels.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static void DeletePPoint(string PPointid)
        {
            int PPointIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tppoints.FirstOrDefault(post => post.ID_PPOINT == PPointIdentifier);
                    if (entity != null)
                    {
                        context.tppoints.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static void DeleteDeviceChannelAccess(string deviceid, string channelid)
        {
            int deviceIdentifier;
            int channelIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tdevicechannelaccesses.FirstOrDefault(post => post.ID_DEVICE == deviceIdentifier && (post.ID_CHANNEL == channelIdentifier));;
                    if (entity != null)
                    {
                        context.tdevicechannelaccesses.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
Example #47
0
        public static void DeleteDeviceChannelAccess(string deviceid, string channelid)
        {
            int deviceIdentifier;
            int channelIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity = context.tdevicechannelaccesses.FirstOrDefault(post => post.ID_DEVICE == deviceIdentifier && (post.ID_CHANNEL == channelIdentifier));;
                    if (entity != null)
                    {
                        context.tdevicechannelaccesses.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
        public static System.Collections.Generic.IEnumerable<DeviceChannelAccessInfo> GetAllDevicesbyChannel(string channelid)
        {
            int channelIdentifier;

            if (int.TryParse(channelid, out channelIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var dbQuery = from edcha in context.tdevicechannelaccesses
                                  join ed in context.tencoderdevices on edcha.ID_DEVICE equals ed.ID_ENCODERDEVICE
                                  join ch in context.channels on edcha.ID_CHANNEL equals ch.id
                                  where edcha.ID_CHANNEL == channelIdentifier
                                  select new DeviceChannelAccessInfo() { id = ch.id, name = ch.name, ID_ENCODERDEVICE = ed.ID_ENCODERDEVICE, DEVICE_NAME = ed.DEVICE_NAME };

                    return dbQuery.AsEnumerable().ToArray();

                }
            }
            return null;
        }
        public static void DeleteChannelPPointAccess(string PPointid, string channelid)
        {
            int PPointIdentifier;
            int channelIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity =
                        context.tchannel_ppoint.FirstOrDefault(
                            post => post.ID_PPOINT == PPointIdentifier && (post.ID_CHANNEL == channelIdentifier));
                    ;
                    if (entity != null)
                    {
                        context.tchannel_ppoint.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
Example #50
0
        public static void DeleteChannelPPointAccess(string PPointid, string channelid)
        {
            int PPointIdentifier;
            int channelIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    var entity =
                        context.tchannel_ppoint.FirstOrDefault(
                            post => post.ID_PPOINT == PPointIdentifier && (post.ID_CHANNEL == channelIdentifier));
                    ;
                    if (entity != null)
                    {
                        context.tchannel_ppoint.Remove(entity);
                        context.SaveChanges();
                    }
                }
            }
        }
Example #51
0
        public static System.Collections.Generic.IEnumerable <DeviceChannelAccessInfo> GetAllChannelsByDevice(string deviceid)
        {
            int deviceIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier))
            {
                using (vooEntities context = new vooEntities())
                {
                    var dbQuery = from edcha in context.tdevicechannelaccesses
                                  join ed in context.tencoderdevices on edcha.ID_DEVICE equals ed.ID_ENCODERDEVICE
                                  join ch in context.channels on edcha.ID_CHANNEL equals ch.id
                                  where edcha.ID_DEVICE == deviceIdentifier
                                  select new DeviceChannelAccessInfo()
                    {
                        id = ch.id, name = ch.name, ID_ENCODERDEVICE = ed.ID_ENCODERDEVICE, DEVICE_NAME = ed.DEVICE_NAME
                    };

                    return(dbQuery.AsEnumerable().ToArray());
                }
            }
            return(null);
        }
        public static tchannel_ppoint GetChannel_Ppoint(string PPointid, string channelid)
        {
            int PPointIdentifier;
            int channelIdentifier;

            if (int.TryParse(PPointid, out PPointIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    return
                        context.tchannel_ppoint.FirstOrDefault(
                            post => post.ID_PPOINT == PPointIdentifier && (post.ID_CHANNEL == channelIdentifier));
                }
            }

            return null;
        }
        public static tdevicechannelaccess UpdateDeviceChannelAccess(tdevicechannelaccess post)
        {
            using (vooEntities context = new vooEntities())
            {
                context.Entry(post).State = EntityState.Modified;
                context.SaveChanges();
            }

            return post;
        }
 public static tdevicechannelaccess[] GetDeviceChannelAccess()
 {
     using (vooEntities context = new vooEntities())
     {
         return context.tdevicechannelaccesses.ToArray();
     }
 }
        public static tdevicechannelaccess GetDeviceChannelAccess(string deviceid, string channelid)
        {
            int deviceIdentifier;
            int channelIdentifier;

            if (int.TryParse(deviceid, out deviceIdentifier) && (int.TryParse(channelid, out channelIdentifier)))
            {
                using (vooEntities context = new vooEntities())
                {
                    return context.tdevicechannelaccesses.FirstOrDefault(post => post.ID_DEVICE == deviceIdentifier && (post.ID_CHANNEL == channelIdentifier));
                }
            }

            return null;
        }
 public static tchannel_ppoint[] GetChannel_Ppoints()
 {
     using (vooEntities context = new vooEntities())
     {
         return context.tchannel_ppoint.ToArray();
     }
 }