Exemplo n.º 1
0
 public static Video InsertWithReturn(string url, string descripcion, string modulo)
 {
     VideoDSTableAdapters.tbl_videoTableAdapter adapter
         = new VideoDSTableAdapters.tbl_videoTableAdapter();
     VideoDS.tbl_videoDataTable table = adapter.InsertWithReturn(url, descripcion, modulo, 0);
     if (table.Rows.Count == 0)
     {
         return(null);
     }
     return(RowToDto(table[0]));
 }
Exemplo n.º 2
0
 public static Video SelectById(int id)
 {
     VideoDSTableAdapters.tbl_videoTableAdapter adapter
         = new VideoDSTableAdapters.tbl_videoTableAdapter();
     VideoDS.tbl_videoDataTable table = adapter.selectById(id);
     if (table.Rows.Count == 0)
     {
         return(null);
     }
     return(RowToDto(table[0]));
 }
Exemplo n.º 3
0
    public static List <Video> SelectByModulo(string modulo)
    {
        VideoDSTableAdapters.tbl_videoTableAdapter adapter
            = new VideoDSTableAdapters.tbl_videoTableAdapter();
        VideoDS.tbl_videoDataTable table = adapter.selectByModulo(modulo);
        List <Video> listVideo           = new List <Video>();

        foreach (VideoDS.tbl_videoRow row in table)
        {
            listVideo.Add(RowToDto(row));
        }
        return(listVideo);
    }