Пример #1
0
        public override bool authenticate( )
        {
            if (base.authenticate() == false)
            {
                return(false);
            }

            Registry("authenticate ins_empresa ");

            /// USER [ authenticate ]

            input_cont_de.set_st_empresa(input_cont_de.get_st_empresa().PadLeft(6, '0'));

            emp = new T_Empresa(this);

            if (emp.select_rows_empresa(input_cont_de.get_st_empresa()))
            {
                PublishError("Empresa previamente cadastrada");
                return(false);
            }

            /// USER [ authenticate ] END

            Registry("authenticate done ins_empresa ");

            return(true);
        }
Пример #2
0
        public override bool authenticate( )
        {
            if (base.authenticate() == false)
            {
                return(false);
            }

            Registry("authenticate exec_alteraEmpresa ");

            /// USER [ authenticate ]

            emp = new T_Empresa(this);

            // ## Busca empresa especifica via CNPJ

            if (!emp.select_rows_empresa(input_cont_de.get_st_empresa().PadLeft(6, '0')))
            {
                PublishError("Empresa " + input_cont_de.get_st_empresa() + " não existente");
                return(false);
            }

            if (!emp.fetch())
            {
                return(false);
            }

            /// USER [ authenticate ] END

            Registry("authenticate done exec_alteraEmpresa ");

            return(true);
        }