Example #1
0
        public override bool execute( )
        {
            if (base.execute() == false)
            {
                return(false);
            }

            Registry("execute exec_alteraTerminal ");

            /// USER [ execute ]

            // ## Atualiza dados

            term.set_st_localizacao(input_st_localizacao);

            if (!term.synchronize_T_Terminal())
            {
                return(false);
            }

            PublishNote("Terminal atualizado com sucesso");

            /// USER [ execute ] END

            Registry("execute done exec_alteraTerminal ");

            return(true);
        }
Example #2
0
        public override bool execute( )
        {
            if (base.execute() == false)
            {
                return(false);
            }

            Registry("execute del_Terminal ");

            /// USER [ execute ]

            input_st_terminal = input_st_terminal.PadLeft(8, '0');

            T_Terminal term_upd = new T_Terminal(this);

            while (term.fetch())
            {
                if (term.get_nu_terminal() == input_st_terminal)
                {
                    term_upd.ExclusiveAccess();

                    term_upd.selectIdentity(term.get_identity());

                    term_upd.set_fk_loja(Context.NONE);

                    if (!term_upd.synchronize_T_Terminal())
                    {
                        return(false);
                    }

                    term_upd.ReleaseExclusive();

                    PublishNote("Terminal " + input_st_terminal + " removido com sucesso");
                    return(true);
                }
            }

            /// USER [ execute ] END

            Registry("execute done del_Terminal ");

            return(true);
        }