示例#1
0
        public static Carrinho FindByName(string nome)
        {
            CarrinhoManipulation item = new CarrinhoManipulation();
            Carrinho             i    = item.FindByName(nome);

            return(i);
        }
示例#2
0
        public void ChangeName(string nome)
        {
            CarrinhoManipulation item = new CarrinhoManipulation();

            if (item.FindByName(nome) != null)
            {
                throw new MercurioCoreException("Carrinho já criado no Banco de Dados");
            }
            Nome = nome;
        }
示例#3
0
        public void CreateCarrinho()
        {
            if (Nome == null)
            {
                throw new MercurioCoreException("Carrinho sem nome");
            }
            if (Id != 0)
            {
                throw new MercurioCoreException("Carrinho já criado no Banco de Dados");
            }
            CarrinhoManipulation item = new CarrinhoManipulation();

            if (item.FindByName(Nome) != null)
            {
                throw new MercurioCoreException("Carrinho já criado no Banco de Dados");
            }
            Carrinho novo = item.Create(this);

            Id = novo.Id;
        }