示例#1
0
        public static Jucator getFromTextBox(String textBoxString, DBConection con)
        {
            if (textBoxString == "" || textBoxString.StartsWith("Jucator"))
            {
                return(null);
            }
            int  n;
            bool b  = int.TryParse(textBoxString, out n);
            bool b1 = textBoxString.All(char.IsDigit);

            if (b1)
            {
                return(con.getConcurentWithMPByID(textBoxString));
            }
            else
            {
                //prenume, nume
                int i = textBoxString.IndexOf(',');
                return(con.getJucatorByFullName(textBoxString.Substring(i + 2), textBoxString.Substring(0, i)));
            }
        }