Ejemplo n.º 1
0
        public static Cliente getCLienteFromRow(ClienteDS.ClienteRow row)
        {
            Cliente obj = new Cliente()
            {
                ClienteId = row.cliente_id,
                Nombre    = row.nombre,
                Nit       = row.nit
            };

            return(obj);
        }
Ejemplo n.º 2
0
    private static Cliente FillReccord(ClienteDS.ClienteRow row)
    {
        Cliente obj = new Cliente()
        {
            ClienteId      = row.clienteId,
            CI             = row.IsciNull() ? "" : row.ci,
            NombreCompleto = row.nombreCompleto,
            EsVendedor     = row.esVendedor
        };

        return(obj);
    }
Ejemplo n.º 3
0
    public static Cliente GetClienteById(int ClienteId)
    {
        Cliente theData = null;

        try
        {
            ClienteDSTableAdapters.ClienteTableAdapter localAdapter = new ClienteDSTableAdapters.ClienteTableAdapter();
            ClienteDS.ClienteDataTable table = localAdapter.GetClienteById(ClienteId);

            if (table != null && table.Rows.Count > 0)
            {
                ClienteDS.ClienteRow row = table[0];
                theData = FillReccord(row);
            }
        }
        catch (Exception q)
        {
            throw new ArgumentException(q.Message, q);
        }

        return(theData);
    }