Пример #1
0
        public int SaveMatricula(MatriculaDTO _item)
        {
            MatriculaDAL cmd = new MatriculaDAL();

            int result = 0;

            if (_item.idMatricula == 0)
            {
                result = cmd.InsertData(_item);
            }
            else
            {
                result = cmd.UpdateData(_item);

                if (result != 0)
                {
                    return(_item.idMatricula);
                }
            }

            return(result);
        }