예제 #1
0
        public bool AddRelationship(RelationshipDTO relationshipDTO)
        {
            string tenQuanHe = relationshipDTO.getTenQuanHe();

            string queryString = "INSERT INTO LOAIQUANHE(TENLOAIQUANHE, DAXOA)" +
                                 "VALUES('" +
                                 tenQuanHe +
                                 "', false" +
                                 ")";

            Console.WriteLine(queryString);
            this.command.CommandText = queryString;
            try
            {
                this.command.ExecuteNonQuery();
            }
            catch (Exception e)
            {
                Console.WriteLine(e.StackTrace);
                return(false);
            }

            return(true);
        }
예제 #2
0
 public QuanHeVM(RelationshipDTO relateDTO)
 {
     this.tenQuanHe = relateDTO.getTenQuanHe();
 }