Пример #1
0
        // Find a customer by name and category
        public static int SearchForCustomer(string customername, string categoryname)
        {
            string sql;

            sql = SqlProcedures.GetCustomers(customername, categoryname);
            DataTable temp = Call(sql);

            if (temp.Rows.Count > 0)
            {
                int id;
                int.TryParse(temp.Rows[0][0].ToString(), out id);
                return(id);
            }
            else
            {
                return(-1);
            }
        }