Exemplo n.º 1
0
 public static TipoPago SelectById(int id)
 {
     TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter adapter = new TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter();
     TipoPagoDS.tbl_tipoPagoDataTable table = adapter.selectById(id);
     if (table.Rows.Count == 0)
     {
         return(null);
     }
     return(RowToDto(table[0]));
 }
Exemplo n.º 2
0
 public static TipoPago InsertWithReturn(string nombre)
 {
     TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter adapter = new TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter();
     TipoPagoDS.tbl_tipoPagoDataTable table = adapter.InsertWithReturn(nombre, 0);
     if (table.Rows.Count == 0)
     {
         return(null);
     }
     return(RowToDto(table[0]));
 }
Exemplo n.º 3
0
    public static List <TipoPago> SelectAll()
    {
        TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter adapter = new TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter();
        TipoPagoDS.tbl_tipoPagoDataTable table = adapter.selectNoEliminados();
        List <TipoPago> listTipoPago           = new List <TipoPago>();

        foreach (TipoPagoDS.tbl_tipoPagoRow row in table)
        {
            listTipoPago.Add(RowToDto(row));
        }
        return(listTipoPago);
    }
Exemplo n.º 4
0
 public static void Delete(int id)
 {
     TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter adapter = new TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter();
     adapter.DeleteRow(id);
 }
Exemplo n.º 5
0
 public static void Update(string nombre, int id)
 {
     TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter adapter = new TipoPagoDSTableAdapters.tbl_tipoPagoTableAdapter();
     adapter.UpdateById(nombre, 0, id, id);
 }