Ejemplo n.º 1
0
        public static int getCustomerId(string firstName, string lastName, string phone)
        {
            int       customerId = 4;
            DataTable table;

            adapter = getNewAdapter();
            table   = adapter.GetDataBy(lastName, firstName, phone);
            adapter.Dispose();

            customerId = (int)table.Select()[0].ItemArray[0];

            return(customerId);
        }
Ejemplo n.º 2
0
        public static bool hasCustomer(string firstName, string lastName, string phone)
        {
            bool      hasId;
            DataTable table;

            adapter = getNewAdapter();
            table   = adapter.GetDataBy(lastName, firstName, phone);
            adapter.Dispose();

            hasId = table.Select().Length > 0;

            return(hasId);
        }