예제 #1
0
        //-------------------------------------------------------------------------------------------------------------------
        public void Incluir(ModeloVenda obj, SqlConnection cn, SqlTransaction tran)
        {
            //O nome da categoria é obrigatorio
            if (obj.ven_nfiscal <= 0)
            {
                throw new Exception("Campo não Informado");
            }


            if (obj.ven_pagto_total <= 0)
            {
                throw new Exception("Campo obrigatorio");
            }

            if (obj.ven_nparcela <= 0)
            {
                throw new Exception("Campo Obrigatorio");
            }

            if (obj.ven_status <= 0)
            {
                throw new Exception("Campo Obrigatorio");
            }

            DALVenda DALobj = new DALVenda();

            DALobj.incluir(obj, cn, tran);
        }