public static tencoderdevice CreateEncoderDevice(tencoderdevice post) { using (vooEntities context = new vooEntities()) { context.tencoderdevices.Add(post); 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 tencoderdevice CreateEncoderDevice(tencoderdevice post) { using (vooEntities context = new vooEntities()) { context.tencoderdevices.Add(post); 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 channel UpdateChannel(channel post) { using (vooEntities context = new vooEntities()) { context.Entry(post).State = EntityState.Modified; context.SaveChanges(); } return(post); }
public static channel CreateChannel(channel post) { using (vooEntities context = new vooEntities()) { context.channels.Add(post); 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 tppoint UpdatePPoint(tppoint 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); }
public static tencoderdevice UpdateEncoderDevice(tencoderdevice post) { using (vooEntities context = new vooEntities()) { context.Entry(post).State = EntityState.Modified; context.SaveChanges(); } return post; }
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 channel CreateChannel(channel post) { using (vooEntities context = new vooEntities()) { context.channels.Add(post); context.SaveChanges(); } return(post); }
public static tdevicechannelaccess CreateDeviceChannelAccess(tdevicechannelaccess post) { using (vooEntities context = new vooEntities()) { context.tdevicechannelaccesses.Add(post); context.SaveChanges(); } return post; }
public static tdevicechannelaccess UpdateDeviceChannelAccess(tdevicechannelaccess post) { using (vooEntities context = new vooEntities()) { context.Entry(post).State = EntityState.Modified; 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; }
public static tppoint CreatePPoint(tppoint post) { using (vooEntities context = new vooEntities()) { context.tppoints.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); }
public static tppointstatu CreatePPointStatus(tppointstatu post) { using (vooEntities context = new vooEntities()) { context.tppointstatus.Add(post); context.SaveChanges(); } return(post); }
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 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 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(); } } } }
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(); } } } }
public static tdevicechannelaccess UpdateDeviceChannelAccess(tdevicechannelaccess post) { using (vooEntities context = new vooEntities()) { context.Entry(post).State = EntityState.Modified; context.SaveChanges(); } return post; }