public string Getauto(EEP_Models.Models.Auto objauto)
        {
            con.Open();
            string     s   = "select " + objauto.ColunmName + " from " + objauto.TableName + " where ID in (select max(ID) from " + objauto.TableName + ")";
            SqlCommand cmd = new SqlCommand(s, con);
            Object     o   = cmd.ExecuteScalar();
            string     a   = (string)o;

            return(a);
        }
Esempio n. 2
0
        public string Getauto(EEP_Models.Models.Auto objauto)
        {
            string s = objreauto.Getauto(objauto);

            string[] s1 = s.Split('_');
            int      a  = int.Parse(s1[1]);

            throw new Exception("message");
            a++;
            string id = s1[0] + "_" + a;

            return(id);
        }