예제 #1
0
        public Overlay add(Overlay o)
        {
            overlay ov = new overlay();

            ov.active               = o.active;
            ov.header               = o.header;
            ov.footer               = o.footer;
            ov.body                 = o.body;
            ov.preview              = o.preview;
            ov.title                = o.title;
            ov.width                = o.width;
            ov.height               = o.height;
            ov.guide                = o.guide;
            ov.bottom_overlay       = o.bottom_overlay;
            ov.layout               = o.layout;
            ov.speed                = o.speed;
            ov.group_by_start       = o.group_by_start;
            ov.group_by_location    = o.group_by_location;
            ov.all_sessions         = o.all_sessions;
            ov.template_id_announce = o.template_id_announce;
            ov.template_id_end      = o.template_id_end;
            ov.bottom_height        = o.bottom_height;

            db.overlays.InsertOnSubmit(ov);

            db.SubmitChanges();

            o.id = ov.id;

            return(o);
        }
예제 #2
0
        public Overlay update(Overlay o)
        {
            overlay ov = db.overlays.Single(x => x.id == o.id);

            ov.active               = o.active;
            ov.header               = o.header;
            ov.footer               = o.footer;
            ov.body                 = o.body;
            ov.preview              = o.preview;
            ov.title                = o.title;
            ov.width                = o.width;
            ov.height               = o.height;
            ov.guide                = o.guide;
            ov.bottom_overlay       = o.bottom_overlay;
            ov.layout               = o.layout;
            ov.speed                = o.speed;
            ov.group_by_start       = o.group_by_start;
            ov.group_by_location    = o.group_by_location;
            ov.all_sessions         = o.all_sessions;
            ov.template_id_announce = o.template_id_announce;
            ov.template_id_end      = o.template_id_end;
            ov.bottom_height        = o.bottom_height;

            db.SubmitChanges();

            return(o);
        }
예제 #3
0
 private void Awake()
 {
     inst = this;
 }