Пример #1
0
        public override bool doEvent(int event_number, object arg)
        {
            switch (event_number)
            {
                #region - event_Load -

            case event_Load:
            {
                //InitEventCode event_Load

                                        #if ROBOT
                var_util.execDefinedRobot(this, var_alias);
                                        #else
                doEvent(event_Translate, null);
                doEvent(event_FormIsOpening, null);
                                        #endif

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Translate -

            case event_Translate:
            {
                //InitEventCode event_Translate
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_FormIsOpening -

            case event_FormIsOpening:
            {
                //InitEventCode event_FormIsOpening

                ctrl_TxtLoja.AcquireTextBox(i_Form.TxtLoja, this, event_val_TxtLoja, 6);
                ctrl_TxtCNPJ.AcquireTextBox(i_Form.TxtCNPJ, this, event_val_TxtCNPJ);

                ctrl_TxtDtAbIni.AcquireTextBox(i_Form.TxtDtAbIni, this, event_val_TxtDtAbIni, dateTextController.FORMAT_DDMMYYYY);
                ctrl_TxtDtAbFim.AcquireTextBox(i_Form.TxtDtAbFim, this, event_val_TxtDtAbFim, dateTextController.FORMAT_DDMMYYYY);

                ctrl_TxtDtFechIni.AcquireTextBox(i_Form.TxtDtFechIni, this, event_val_TxtDtFechIni, dateTextController.FORMAT_DDMMYYYY);
                ctrl_TxtDtFechFim.AcquireTextBox(i_Form.TxtDtFechFim, this, event_val_TxtDtFechFim, dateTextController.FORMAT_DDMMYYYY);

                ctrl_TxtDtAbIni.SetTextBoxText(DateTime.Now.Day.ToString().PadLeft(2, '0') +
                                               DateTime.Now.Month.ToString().PadLeft(2, '0') +
                                               DateTime.Now.Year.ToString().PadLeft(2, '0'));

                ctrl_TxtDtAbFim.SetTextBoxText(DateTime.Now.Day.ToString().PadLeft(2, '0') +
                                               DateTime.Now.Month.ToString().PadLeft(2, '0') +
                                               DateTime.Now.Year.ToString().PadLeft(2, '0'));

                ArrayList lst = new ArrayList();

                var_exchange.fetch_conveyUsuarios(ref header, ref lst);

                i_Form.CboOpers.Items.Clear();
                i_Form.CboOpers.Items.Add("(Todos)");
                i_Form.CboResp.Items.Add("(Todos)");

                for (int t = 0; t < lst.Count; ++t)
                {
                    DadosUsuario us = new DadosUsuario(lst[t] as DataPortable);

                    i_Form.CboOpers.Items.Add(us.get_st_nome());
                    i_Form.CboResp.Items.Add(us.get_st_nome());
                }

                i_Form.CboOpers.SelectedIndex      = 0;
                i_Form.CboResp.SelectedIndex       = 0;
                i_Form.CboCateg.SelectedIndex      = 0;
                i_Form.CboPrioridade.SelectedIndex = 0;
                i_Form.CboSit.SelectedIndex        = 0;

                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_ShowDialog -

            case robot_ShowDialog:
            {
                //InitEventCode robot_ShowDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_CloseDialog -

            case robot_CloseDialog:
            {
                //InitEventCode robot_CloseDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Procurar -

            case event_Procurar:
            {
                //InitEventCode event_Procurar

                string nu_categ      = (i_Form.CboCateg.SelectedIndex - 1).ToString();
                string nu_prioridade = (i_Form.CboPrioridade.SelectedIndex - 1).ToString();
                string st_operador   = "";
                string st_resp       = "";
                string tg_closed     = i_Form.CboSit.SelectedIndex.ToString();
                string dt_ini_ab     = "";
                string dt_fim_ab     = "";
                string dt_ini_fech   = "";
                string dt_fim_fech   = "";
                string tg_tecnico    = Context.FALSE;
                string st_loja       = "";

                if (i_Form.CboOpers.SelectedIndex > 0)
                {
                    st_operador = i_Form.CboOpers.SelectedItem.ToString();
                }

                if (i_Form.CboResp.SelectedIndex > 0)
                {
                    st_resp = i_Form.CboResp.SelectedItem.ToString();
                }

                if (ctrl_TxtLoja.IsUserValidated)
                {
                    st_loja = ctrl_TxtLoja.getTextBoxValue();
                }

                if (i_Form.ChkTecnico.Checked)
                {
                    tg_tecnico = Context.TRUE;
                }

                if (ctrl_TxtDtAbIni.IsUserValidated)
                {
                    dt_ini_ab = var_util.GetDataBaseTimeFormat(ctrl_TxtDtAbIni.getTextBoxValue_Date());
                }

                if (ctrl_TxtDtAbFim.IsUserValidated)
                {
                    dt_fim_ab = var_util.GetDataBaseTimeFormat(ctrl_TxtDtAbFim.getTextBoxValue_Date().AddDays(1));
                }

                if (ctrl_TxtDtFechIni.IsUserValidated)
                {
                    dt_ini_fech = var_util.GetDataBaseTimeFormat(ctrl_TxtDtFechIni.getTextBoxValue_Date());
                }

                if (ctrl_TxtDtFechFim.IsUserValidated)
                {
                    dt_fim_fech = var_util.GetDataBaseTimeFormat(ctrl_TxtDtFechFim.getTextBoxValue_Date().AddDays(1));
                }

                string st_block = "";

                var_exchange.fetch_chamados(nu_categ,
                                            nu_prioridade,
                                            st_operador,
                                            tg_closed,
                                            dt_ini_ab,
                                            dt_fim_ab,
                                            dt_ini_fech,
                                            dt_fim_fech,
                                            tg_tecnico,
                                            st_loja,
                                            st_resp,
                                            ref header,
                                            ref st_block);

                ArrayList full_memory = new ArrayList();

                while (st_block != "")
                {
                    ArrayList tmp_memory = new ArrayList();

                    if (var_exchange.fetch_memory(st_block, "400", ref st_block, ref tmp_memory))
                    {
                        for (int t = 0; t < tmp_memory.Count; ++t)
                        {
                            full_memory.Add(tmp_memory[t]);
                        }
                    }
                }

                i_Form.LstChamados.Items.Clear();

                for (int t = 0; t < full_memory.Count; ++t)
                {
                    DadosChamado dc = new DadosChamado(full_memory[t] as DataPortable);

                    string dt_ab   = var_util.getDDMMYYYY_format(dc.get_dt_ab());
                    string dt_fech = dc.get_dt_fech();

                    if (dt_fech.Length > 0)
                    {
                        dt_fech = var_util.getDDMMYYYY_format(dt_fech);
                    }

                    string [] full_row = new string [] { dt_ab,
                                                         dt_fech,
                                                         dc.get_st_oper() + " (" + dc.get_st_resp() + ")",
                                                         dc.get_st_motivo() };

                    i_Form.LstChamados.Items.Add(var_util.GetListViewItem(dc.get_id_chamado(), full_row));
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtLoja -

            case event_val_TxtLoja:
            {
                //InitEventCode event_val_TxtLoja

                switch (arg as string)
                {
                case numberTextController.NUMBER_INCOMPLETE:
                case numberTextController.NUMBER_COMPLETE:
                {
                    if (ctrl_TxtLoja.getTextBoxValue().Length > 0)
                    {
                        i_Form.TxtLoja.BackColor     = Color.White;
                        ctrl_TxtLoja.IsUserValidated = true;

                        if (ctrl_TxtLoja.GetEnterPressed())
                        {
                            DadosLoja dl = new DadosLoja();

                            var_exchange.fetch_dadosLoja("", ctrl_TxtLoja.getTextBoxValue(), ref header, ref dl);

                            i_Form.TxtNome.Text = dl.get_st_nome();
                            ctrl_TxtCNPJ.SetTextBoxText(dl.get_nu_CNPJ());
                        }
                    }
                    else
                    {
                        i_Form.TxtLoja.BackColor     = colorInvalid;
                        ctrl_TxtLoja.IsUserValidated = false;

                        if (ctrl_TxtLoja.GetEnterPressed())
                        {
                            event_dlgConsultaLoja ev_call = new event_dlgConsultaLoja(var_util, var_exchange);

                            ev_call.header = header;

                            ev_call.i_Form.Show();
                        }
                    }

                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtDtAbIni -

            case event_val_TxtDtAbIni:
            {
                //InitEventCode event_val_TxtDtAbIni

                switch (arg as string)
                {
                case dateTextController.DATE_INVALID:
                {
                    i_Form.TxtDtAbIni.BackColor     = colorInvalid;
                    ctrl_TxtDtAbIni.IsUserValidated = false;
                    break;
                }

                case dateTextController.DATE_VALID:
                {
                    i_Form.TxtDtAbIni.BackColor     = Color.White;
                    ctrl_TxtDtAbIni.IsUserValidated = true;
                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtDtAbFim -

            case event_val_TxtDtAbFim:
            {
                //InitEventCode event_val_TxtDtAbFim

                switch (arg as string)
                {
                case dateTextController.DATE_INVALID:
                {
                    i_Form.TxtDtAbFim.BackColor     = colorInvalid;
                    ctrl_TxtDtAbFim.IsUserValidated = false;
                    break;
                }

                case dateTextController.DATE_VALID:
                {
                    i_Form.TxtDtAbFim.BackColor     = Color.White;
                    ctrl_TxtDtAbFim.IsUserValidated = true;
                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtDtFechIni -

            case event_val_TxtDtFechIni:
            {
                //InitEventCode event_val_TxtDtFechIni

                switch (arg as string)
                {
                case dateTextController.DATE_INVALID:
                {
                    i_Form.TxtDtFechIni.BackColor     = colorInvalid;
                    ctrl_TxtDtFechIni.IsUserValidated = false;
                    break;
                }

                case dateTextController.DATE_VALID:
                {
                    i_Form.TxtDtFechIni.BackColor     = Color.White;
                    ctrl_TxtDtFechIni.IsUserValidated = true;
                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtDtFechFim -

            case event_val_TxtDtFechFim:
            {
                //InitEventCode event_val_TxtDtFechFim

                switch (arg as string)
                {
                case dateTextController.DATE_INVALID:
                {
                    i_Form.TxtDtFechFim.BackColor     = colorInvalid;
                    ctrl_TxtDtFechFim.IsUserValidated = false;
                    break;
                }

                case dateTextController.DATE_VALID:
                {
                    i_Form.TxtDtFechFim.BackColor     = Color.White;
                    ctrl_TxtDtFechFim.IsUserValidated = true;
                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtCNPJ -

            case event_val_TxtCNPJ:
            {
                //InitEventCode event_val_TxtCNPJ

                switch (arg as string)
                {
                case cnpjTextController.CNPJ_INCOMPLETE:
                case cnpjTextController.CNPJ_INVALID:
                {
                    i_Form.TxtCNPJ.BackColor     = colorInvalid;
                    ctrl_TxtCNPJ.IsUserValidated = false;

                    if (ctrl_TxtCNPJ.GetEnterPressed())
                    {
                        event_dlgConsultaLoja ev_call = new event_dlgConsultaLoja(var_util, var_exchange);

                        ev_call.header = header;

                        ev_call.i_Form.Show();
                    }

                    break;
                }

                case cnpjTextController.CNPJ_VALID:
                {
                    i_Form.TxtCNPJ.BackColor     = Color.White;
                    ctrl_TxtCNPJ.IsUserValidated = true;
                    ctrl_TxtCNPJ.CleanError();

                    if (ctrl_TxtLoja.GetEnterPressed())
                    {
                        DadosLoja dl = new DadosLoja();

                        var_exchange.fetch_dadosLoja(ctrl_TxtCNPJ.getTextBoxValue(), "", ref header, ref dl);

                        ctrl_TxtLoja.SetTextBoxText(dl.get_st_loja());

                        i_Form.TxtNome.Text = dl.get_st_nome();
                    }

                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Editar -

            case event_Editar:
            {
                //InitEventCode event_Editar

                if (i_Form.LstChamados.SelectedItems.Count > 0)
                {
                    event_dlgEditaChamado ev_call = new event_dlgEditaChamado(var_util, var_exchange);

                    ev_call.header     = header;
                    ev_call.id_chamado = var_util.getSelectedListViewItemTag(i_Form.LstChamados);

                    ev_call.i_Form.ShowDialog();
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Relatorio -

            case event_Relatorio:
            {
                //InitEventCode event_Relatorio

                ArrayList lstReport = new ArrayList();

                lstReport.Add("RELATÓRIO DE CHAMADOS");
                lstReport.Add("");
                lstReport.Add("DT. ABERTURA                  DT. FECHAMENTO                OPER (RESP)");
                lstReport.Add("DESCRIÇÃO");
                lstReport.Add("-------------------------------------------------------------------------------------------------------");
                lstReport.Add("");

                string line = "";

                for (int t = 0; t < i_Form.LstChamados.Items.Count; ++t)
                {
                    line  = i_Form.LstChamados.Items[t].SubItems[0].Text.PadRight(29, ' ') + " ";
                    line += i_Form.LstChamados.Items[t].SubItems[1].Text.PadRight(29, ' ') + " ";
                    line += i_Form.LstChamados.Items[t].SubItems[2].Text.PadRight(32, ' ') + " ";

                    lstReport.Add(line);

                    line = i_Form.LstChamados.Items[t].SubItems[3].Text.PadRight(100, ' ').Substring(0, 100);

                    lstReport.Add(line);
                    lstReport.Add("");
                }

                new ConveyPrinter("Courier New", 7, 10, ref lstReport);

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Print -

            case event_Print:
            {
                //InitEventCode event_Print
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_LstChamadosDoubleClick -

            case event_LstChamadosDoubleClick:
            {
                //InitEventCode event_LstChamadosDoubleClick
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnProcurarClick -

            case event_BtnProcurarClick:
            {
                //InitEventCode event_BtnProcurarClick
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnReportClick -

            case event_BtnReportClick:
            {
                //InitEventCode event_BtnReportClick
                //EndEventCode
                return(true);
            }

                #endregion

            default: break;
            }

            return(false);
        }
Пример #2
0
        public override bool doEvent(int event_number, object arg)
        {
            switch (event_number)
            {
                #region - event_Load -

            case event_Load:
            {
                //InitEventCode event_Load

                                        #if ROBOT
                var_util.execDefinedRobot(this, var_alias);
                                        #else
                doEvent(event_Translate, null);
                doEvent(event_FormIsOpening, null);
                                        #endif

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Translate -

            case event_Translate:
            {
                //InitEventCode event_Translate
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_FormIsOpening -

            case event_FormIsOpening:
            {
                //InitEventCode event_FormIsOpening

                ctrl_TxtLoja.AcquireTextBox(i_Form.TxtLoja, this, event_val_TxtLoja, 6);
                ctrl_TxtEmpresa.AcquireTextBox(i_Form.TxtEmpresa, this, event_val_TxtEmpresa, 6);
                ctrl_TxtFantasia.AcquireTextBox(i_Form.TxtFantasia, this, event_val_TxtFantasia, 40, alphaTextController.ENABLE_NUMBERS);
                ctrl_TxtTaxa.AcquireTextBox(i_Form.TxtTaxa, this, event_val_TxtTaxa, 4, 2);
                ctrl_TxtRepasse.AcquireTextBox(i_Form.TxtRepasse, this, event_val_TxtRepasse, 3);

                ctrl_TxtEmpresa.SetupErrorProvider(ErrorIconAlignment.MiddleRight, false);
                ctrl_TxtRepasse.SetupErrorProvider(ErrorIconAlignment.MiddleRight, false);

                ctrl_TxtBanco.AcquireTextBox(i_Form.TxtBanco, this, event_val_TxtBanco, 3);
                ctrl_TxtAg.AcquireTextBox(i_Form.TxtAg, this, event_val_TxtAg, 5, alphaTextController.ENABLE_NUMBERS);
                ctrl_TxtConta.AcquireTextBox(i_Form.TxtConta, this, event_val_TxtBanco, 11);

                ctrl_TxtBanco.SetTextBoxText("0");
                ctrl_TxtAg.SetTextBoxText("0");
                ctrl_TxtConta.SetTextBoxText("0");
                ctrl_TxtRepasse.SetTextBoxText("0");

                ctrl_TxtTaxa.IsUserValidated = true;

                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_ShowDialog -

            case robot_ShowDialog:
            {
                //InitEventCode robot_ShowDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_CloseDialog -

            case robot_CloseDialog:
            {
                //InitEventCode robot_CloseDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtEmpresa -

            case event_val_TxtEmpresa:
            {
                //InitEventCode event_val_TxtEmpresa

                switch (arg as string)
                {
                case numberTextController.NUMBER_INCOMPLETE:
                case numberTextController.NUMBER_COMPLETE:
                {
                    if (i_Form.TxtEmpresa.Text.Length > 0)
                    {
                        if (i_Form.TxtEmpresa.Text.Length < 6)
                        {
                            i_Form.TxtEmpresa.BackColor     = colorInvalid;
                            ctrl_TxtEmpresa.IsUserValidated = false;
                        }
                        else
                        {
                            i_Form.TxtEmpresa.BackColor = Color.White;
                        }

                        ctrl_TxtEmpresa.IsUserValidated = true;
                        ctrl_TxtEmpresa.CleanError();

                        if (ctrl_TxtEmpresa.GetEnterPressed())
                        {
                            string st_nome    = "";
                            string st_empresa = ctrl_TxtEmpresa.getTextBoxValue().PadLeft(6, '0');

                            if (var_exchange.fetch_validaEmpresa(st_empresa,
                                                                 ref header,
                                                                 ref st_nome))
                            {
                                ctrl_TxtEmpresa.SetTextBoxText(st_empresa);
                                ctrl_TxtFantasia.SetTextBoxText(st_nome);

                                i_Form.TxtFantasia.BackColor     = Color.White;
                                i_Form.TxtEmpresa.BackColor      = Color.White;
                                ctrl_TxtFantasia.IsUserValidated = true;
                                ctrl_TxtEmpresa.IsUserValidated  = true;
                            }
                            else
                            {
                                i_Form.TxtEmpresa.BackColor      = colorInvalid;
                                i_Form.TxtFantasia.BackColor     = colorInvalid;
                                ctrl_TxtFantasia.IsUserValidated = false;
                                ctrl_TxtEmpresa.IsUserValidated  = false;
                            }
                        }
                    }
                    else
                    {
                        i_Form.TxtEmpresa.BackColor     = colorInvalid;
                        ctrl_TxtEmpresa.IsUserValidated = false;

                        if (ctrl_TxtEmpresa.GetEnterPressed())
                        {
                            event_dlgConsultaLoja ev_call = new event_dlgConsultaLoja(var_util, var_exchange);

                            ev_call.header = header;

                            ev_call.i_Form.ShowDialog();
                        }
                    }

                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtFantasia -

            case event_val_TxtFantasia:
            {
                //InitEventCode event_val_TxtFantasia

                switch (arg as string)
                {
                case alphaTextController.ALPHA_COMPLETE:
                case alphaTextController.ALPHA_INCOMPLETE:
                {
                    if (ctrl_TxtFantasia.getTextBoxValue().Length > 3)
                    {
                        ctrl_TxtFantasia.CleanError();

                        if (ctrl_TxtFantasia.GetEnterPressed())
                        {
                            ArrayList lst = new ArrayList();

                            if (var_exchange.fetch_nomeEmpresa(ctrl_TxtFantasia.getTextBoxValue(),
                                                               ref header,
                                                               ref lst))
                            {
                                event_dlgSelecionaEmpresa ev_call = new event_dlgSelecionaEmpresa(var_util, var_exchange);

                                ev_call.header = header;
                                ev_call.lst    = lst;

                                ev_call.i_Form.ShowDialog();

                                if (ev_call.var_empresa != "" && ev_call.var_fantasia != "")
                                {
                                    ctrl_TxtEmpresa.SetTextBoxText(ev_call.var_empresa);
                                    ctrl_TxtFantasia.SetTextBoxText(ev_call.var_fantasia);

                                    i_Form.TxtFantasia.BackColor     = Color.White;
                                    i_Form.TxtEmpresa.BackColor      = Color.White;
                                    ctrl_TxtFantasia.IsUserValidated = true;
                                    ctrl_TxtEmpresa.IsUserValidated  = true;
                                }
                                else
                                {
                                    ctrl_TxtEmpresa.SetTextBoxText("");
                                    ctrl_TxtFantasia.SetTextBoxText("");

                                    i_Form.TxtEmpresa.BackColor      = colorInvalid;
                                    i_Form.TxtFantasia.BackColor     = colorInvalid;
                                    ctrl_TxtFantasia.IsUserValidated = false;
                                    ctrl_TxtEmpresa.IsUserValidated  = false;
                                }
                            }
                        }
                    }
                    else
                    {
                        i_Form.TxtFantasia.BackColor     = colorInvalid;
                        ctrl_TxtFantasia.IsUserValidated = false;
                    }

                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Adicionar -

            case event_Adicionar:
            {
                //InitEventCode event_Adicionar

                bool IsDone = true;

                if (!ctrl_TxtEmpresa.IsUserValidated)
                {
                    ctrl_TxtEmpresa.SetErrorMessage("O código da empresa deve ser informado");   IsDone = false;
                }
                if (!ctrl_TxtRepasse.IsUserValidated)
                {
                    ctrl_TxtRepasse.SetErrorMessage("O número de dias para repasse deve ser informado"); IsDone = false;
                }

                if (!IsDone)
                {
                    return(false);
                }

                int max = i_Form.LstConvenios.Items.Count;

                for (int t = 0; t < max; ++t)
                {
                    if (i_Form.LstConvenios.Items[t].SubItems[0].Text == ctrl_TxtEmpresa.getTextBoxValue())
                    {
                        i_Form.LstConvenios.Items[t].SubItems [2].Text = ctrl_TxtTaxa.getTextBoxValue().PadLeft(4, '0').Insert(2, ",") + " %";
                        i_Form.LstConvenios.Items[t].SubItems [3].Text = ctrl_TxtRepasse.getTextBoxValue();
                        i_Form.LstConvenios.Items[t].SubItems [4].Text = i_Form.TxtBanco.Text;
                        i_Form.LstConvenios.Items[t].SubItems [5].Text = i_Form.TxtAg.Text;
                        i_Form.LstConvenios.Items[t].SubItems [6].Text = i_Form.TxtConta.Text;
                        return(false);
                    }
                }

                string [] full_row = new string [] { ctrl_TxtEmpresa.getTextBoxValue(),
                          ctrl_TxtFantasia.getTextBoxValue(),
                          ctrl_TxtTaxa.getTextBoxValue().PadLeft(4, '0').Insert(2, ",") + " %",
                                                     ctrl_TxtRepasse.getTextBoxValue(),
                                                     ctrl_TxtBanco.getTextBoxValue(),
                                                     ctrl_TxtAg.getTextBoxValue(),
                                                     ctrl_TxtConta.getTextBoxValue() };

                string emp = ctrl_TxtEmpresa.getTextBoxValue();

                i_Form.LstConvenios.Items.Add(var_util.GetListViewItem(emp, full_row));

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Remover -

            case event_Remover:
            {
                //InitEventCode event_Remover

                if (i_Form.LstConvenios.SelectedItems.Count > 0)
                {
                    string emp = i_Form.LstConvenios.SelectedItems[0].Text;

                    i_Form.LstConvenios.Items.Remove(i_Form.LstConvenios.SelectedItems[0]);
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Confirmar -

            case event_Confirmar:
            {
                //InitEventCode event_Confirmar

                int max = i_Form.LstConvenios.Items.Count;

                string st_csv_empresas     = "";
                string st_csv_taxas        = "";
                string st_csv_dias_repasse = "";

                string st_csv_banco_repasse = "";
                string st_csv_ag_repasse    = "";
                string st_csv_conta_repasse = "";

                for (int t = 0; t < max; ++t)
                {
                    string emp = i_Form.LstConvenios.Items[t].SubItems[0].Text;

                    st_csv_empresas     += emp;
                    st_csv_taxas        += i_Form.LstConvenios.Items[t].SubItems[2].Text.Replace(",", "").Replace(" %", "");
                    st_csv_dias_repasse += i_Form.LstConvenios.Items[t].SubItems[3].Text;

                    st_csv_banco_repasse += i_Form.LstConvenios.Items[t].SubItems[4].Text;
                    st_csv_ag_repasse    += i_Form.LstConvenios.Items[t].SubItems[5].Text;
                    st_csv_conta_repasse += i_Form.LstConvenios.Items[t].SubItems[6].Text;

                    if (t < max - 1)
                    {
                        st_csv_empresas      += ",";
                        st_csv_taxas         += ",";
                        st_csv_dias_repasse  += ",";
                        st_csv_banco_repasse += ",";
                        st_csv_ag_repasse    += ",";
                        st_csv_conta_repasse += ",";
                    }
                }

                DadosLoja dl = new DadosLoja();

                dl.set_nu_CNPJ(cnpj);

                var_exchange.exec_alteraLoja(st_csv_empresas,
                                             st_csv_taxas,
                                             st_csv_dias_repasse,
                                             st_csv_banco_repasse,
                                             st_csv_ag_repasse,
                                             st_csv_conta_repasse,
                                             ref dl,
                                             ref header);

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtTaxa -

            case event_val_TxtTaxa:
            {
                //InitEventCode event_val_TxtTaxa
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtRepasse -

            case event_val_TxtRepasse:
            {
                //InitEventCode event_val_TxtRepasse

                if (i_Form.TxtRepasse.Text.Length == 0)
                {
                    i_Form.TxtRepasse.BackColor     = colorInvalid;
                    ctrl_TxtRepasse.IsUserValidated = false;
                }
                else
                {
                    i_Form.TxtRepasse.BackColor     = Color.White;
                    ctrl_TxtRepasse.IsUserValidated = true;
                    ctrl_TxtRepasse.CleanError();
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtCNPJ -

            case event_val_TxtCNPJ:
            {
                //InitEventCode event_val_TxtCNPJ
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Convenio -

            case event_Convenio:
            {
                //InitEventCode event_Convenio

                if (i_Form.LstConvenios.SelectedItems.Count == 0)
                {
                    return(false);
                }

                int index = i_Form.LstConvenios.SelectedIndices[0];

                string emp   = i_Form.LstConvenios.Items [index].SubItems[0].Text;
                string ft    = i_Form.LstConvenios.Items [index].SubItems[1].Text;
                string tx    = i_Form.LstConvenios.Items [index].SubItems[2].Text;
                string rp    = i_Form.LstConvenios.Items [index].SubItems[3].Text;
                string banco = i_Form.LstConvenios.Items [index].SubItems[4].Text;
                string ag    = i_Form.LstConvenios.Items [index].SubItems[5].Text;
                string conta = i_Form.LstConvenios.Items [index].SubItems[6].Text;

                ctrl_TxtEmpresa.SetTextBoxText(emp);      i_Form.TxtEmpresa.BackColor  = Color.White;
                ctrl_TxtFantasia.SetTextBoxText(ft);      i_Form.TxtFantasia.BackColor = Color.White;
                ctrl_TxtTaxa.SetTextBoxText(tx);      i_Form.TxtTaxa.BackColor         = Color.White;
                ctrl_TxtRepasse.SetTextBoxText(rp);      i_Form.TxtRepasse.BackColor   = Color.White;

                ctrl_TxtBanco.SetTextBoxText(banco.PadLeft(1, '0'));
                ctrl_TxtAg.SetTextBoxText(ag.PadLeft(1, '0'));
                ctrl_TxtConta.SetTextBoxText(conta.PadLeft(1, '0'));

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtBanco -

            case event_val_TxtBanco:
            {
                //InitEventCode event_val_TxtBanco

                if (i_Form.TxtBanco.Text.Length == 0)
                {
                    i_Form.TxtBanco.BackColor     = colorInvalid;
                    ctrl_TxtBanco.IsUserValidated = false;
                }
                else
                {
                    i_Form.TxtBanco.BackColor     = Color.White;
                    ctrl_TxtBanco.IsUserValidated = true;
                    ctrl_TxtBanco.CleanError();
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtAg -

            case event_val_TxtAg:
            {
                //InitEventCode event_val_TxtAg

                if (ctrl_TxtAg.getTextBoxValue().Length == 0)
                {
                    i_Form.TxtAg.BackColor     = colorInvalid;
                    ctrl_TxtAg.IsUserValidated = false;
                }
                else
                {
                    i_Form.TxtAg.BackColor     = Color.White;
                    ctrl_TxtAg.IsUserValidated = true;
                    ctrl_TxtAg.CleanError();
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtConta -

            case event_val_TxtConta:
            {
                //InitEventCode event_val_TxtConta

                if (ctrl_TxtConta.getTextBoxValue_Long() == 0)
                {
                    i_Form.TxtConta.BackColor     = colorInvalid;
                    ctrl_TxtConta.IsUserValidated = false;
                }
                else
                {
                    i_Form.TxtConta.BackColor     = Color.White;
                    ctrl_TxtConta.IsUserValidated = true;
                    ctrl_TxtConta.CleanError();
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtLoja -

            case event_val_TxtLoja:
            {
                //InitEventCode event_val_TxtLoja

                switch (arg as string)
                {
                case numberTextController.NUMBER_INCOMPLETE:
                case numberTextController.NUMBER_COMPLETE:
                {
                    if (i_Form.TxtLoja.Text.Length > 0)
                    {
                        i_Form.TxtLoja.BackColor     = Color.White;
                        ctrl_TxtLoja.IsUserValidated = true;
                        ctrl_TxtLoja.CleanError();

                        if (ctrl_TxtLoja.GetEnterPressed())
                        {
                            ArrayList list = new ArrayList();

                            var_exchange.fetch_listaConveniosLoja(ctrl_TxtLoja.getTextBoxValue(),
                                                                  ref header,
                                                                  ref cnpj,
                                                                  ref list);

                            i_Form.LstConvenios.Items.Clear();

                            for (int t = 0; t < list.Count; ++t)
                            {
                                DadosEmpresa de = new DadosEmpresa(list[t] as DataPortable);

                                string emp = de.get_st_empresa();

                                string [] full_row = new string [] { emp,
                                                                     de.get_st_fantasia(),
                                                                     de.get_tx_convenio().PadLeft(4, '0').Insert(2, ",") + " %",
                                                                     de.get_nu_dias_convenio(),
                                                                     de.get_st_banco(),
                                                                     de.get_st_ag(),
                                                                     de.get_st_conta() };

                                i_Form.LstConvenios.Items.Add(var_util.GetListViewItem(emp, full_row));
                            }
                        }
                    }
                    else
                    {
                        i_Form.TxtLoja.BackColor     = colorInvalid;
                        ctrl_TxtLoja.IsUserValidated = false;
                    }
                    break;
                }
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_LstConveniosClick -

            case event_LstConveniosClick:
            {
                //InitEventCode event_LstConveniosClick
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnRemoverClick -

            case event_BtnRemoverClick:
            {
                //InitEventCode event_BtnRemoverClick
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnAdicionarClick -

            case event_BtnAdicionarClick:
            {
                //InitEventCode event_BtnAdicionarClick
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnConfirmarClick -

            case event_BtnConfirmarClick:
            {
                //InitEventCode event_BtnConfirmarClick
                //EndEventCode
                return(true);
            }

                #endregion

            default: break;
            }

            return(false);
        }
Пример #3
0
        public dlgConsultaLoja(event_dlgConsultaLoja par_ev_layer)
        {
            InitializeComponent();

            ev_layer = par_ev_layer;
        }
        public override bool doEvent(int event_number, object arg)
        {
            switch (event_number)
            {
                #region - event_Load -

            case event_Load:
            {
                //InitEventCode event_Load

                                        #if ROBOT
                var_util.execDefinedRobot(this, var_alias);
                                        #else
                doEvent(event_Translate, null);
                doEvent(event_FormIsOpening, null);
                                        #endif

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Translate -

            case event_Translate:
            {
                //InitEventCode event_Translate
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_FormIsOpening -

            case event_FormIsOpening:
            {
                //InitEventCode event_FormIsOpening

                ctrl_TxtLoja.AcquireTextBox(i_Form.TxtLoja, this, event_val_TxtLoja, 6);

                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_ShowDialog -

            case robot_ShowDialog:
            {
                //InitEventCode robot_ShowDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - robot_CloseDialog -

            case robot_CloseDialog:
            {
                //InitEventCode robot_CloseDialog
                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_Confirmar -

            case event_Confirmar:
            {
                //InitEventCode event_Confirmar

                if (!ctrl_TxtLoja.IsUserValidated)
                {
                    MessageBox.Show("Favor informar o código de loja", "Aviso");
                    return(false);
                }

                if (i_Form.CboCateg.SelectedIndex == -1)
                {
                    MessageBox.Show("Favor informar a categoria", "Aviso");
                    return(false);
                }

                if (i_Form.CboPrioridade.SelectedIndex == -1)
                {
                    MessageBox.Show("Favor informar a prioridade", "Aviso");
                    return(false);
                }

                DadosChamado dc = new DadosChamado();

                dc.set_nu_categ(i_Form.CboCateg.SelectedIndex.ToString());
                dc.set_nu_prioridade(i_Form.CboPrioridade.SelectedIndex.ToString());
                dc.set_st_cod_loja(ctrl_TxtLoja.getTextBoxValue());
                dc.set_st_motivo(i_Form.TxtDesc.Text);

                if (i_Form.ChkTecnico.Checked)
                {
                    dc.set_tg_tecnico(Context.TRUE);
                }
                else
                {
                    dc.set_tg_tecnico(Context.FALSE);
                }

                var_exchange.ins_chamado(ref dc, ref header);

                if (i_Form.ChkTecnico.Checked)
                {
                    event_dlgCustoChamado ev_call = new event_dlgCustoChamado(var_util, var_exchange);

                    ev_call.header   = header;
                    ev_call.cod_loja = ctrl_TxtLoja.getTextBoxValue();

                    ev_call.i_Form.ShowDialog();
                }

                i_Form.Close();

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_val_TxtLoja -

            case event_val_TxtLoja:
            {
                //InitEventCode event_val_TxtLoja

                switch (arg as string)
                {
                case numberTextController.NUMBER_INCOMPLETE:
                case numberTextController.NUMBER_COMPLETE:
                {
                    if (ctrl_TxtLoja.getTextBoxValue().Length > 0)
                    {
                        i_Form.TxtLoja.BackColor     = Color.White;
                        ctrl_TxtLoja.IsUserValidated = true;

                        if (ctrl_TxtLoja.GetEnterPressed())
                        {
                            DadosLoja dl = new DadosLoja();

                            var_exchange.fetch_dadosLoja("", ctrl_TxtLoja.getTextBoxValue(), ref header, ref dl);

                            i_Form.TxtNome.Text = dl.get_st_nome();
                        }
                    }
                    else
                    {
                        i_Form.TxtLoja.BackColor     = colorInvalid;
                        ctrl_TxtLoja.IsUserValidated = false;

                        if (ctrl_TxtLoja.GetEnterPressed())
                        {
                            event_dlgConsultaLoja ev_call = new event_dlgConsultaLoja(var_util, var_exchange);

                            ev_call.header = header;

                            ev_call.i_Form.Show();
                        }
                    }

                    break;
                }

                default: break;
                }

                //EndEventCode
                return(true);
            }

                #endregion

                #region - event_BtnConfirmarClick -

            case event_BtnConfirmarClick:
            {
                //InitEventCode event_BtnConfirmarClick
                //EndEventCode
                return(true);
            }

                #endregion

            default: break;
            }

            return(false);
        }
Пример #5
0
        public RobotEngine(ApplicationUtil util, Exchange ex)
        {
            var_exchange = ex;
            var_util     = util;

                        #if ROBOT
            event_dlgRemessa tmp_event_dlgRemessa = new event_dlgRemessa(util, ex);
            tmp_event_dlgRemessa.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgRemessa"] = tmp_event_dlgRemessa;

            event_dlgGraficosEmp tmp_event_dlgGraficosEmp = new event_dlgGraficosEmp(util, ex);
            tmp_event_dlgGraficosEmp.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgGraficosEmp"] = tmp_event_dlgGraficosEmp;

            event_dlgDBF_Fechamento tmp_event_dlgDBF_Fechamento = new event_dlgDBF_Fechamento(util, ex);
            tmp_event_dlgDBF_Fechamento.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgDBF_Fechamento"] = tmp_event_dlgDBF_Fechamento;

            event_dlgReimpGift tmp_event_dlgReimpGift = new event_dlgReimpGift(util, ex);
            tmp_event_dlgReimpGift.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgReimpGift"] = tmp_event_dlgReimpGift;

            event_dlgObservacao tmp_event_dlgObservacao = new event_dlgObservacao(util, ex);
            tmp_event_dlgObservacao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgObservacao"] = tmp_event_dlgObservacao;

            event_dlgPrevLojista tmp_event_dlgPrevLojista = new event_dlgPrevLojista(util, ex);
            tmp_event_dlgPrevLojista.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgPrevLojista"] = tmp_event_dlgPrevLojista;

            event_dlgVendaParcelada tmp_event_dlgVendaParcelada = new event_dlgVendaParcelada(util, ex);
            tmp_event_dlgVendaParcelada.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgVendaParcelada"] = tmp_event_dlgVendaParcelada;

            event_dlgVendaLojista tmp_event_dlgVendaLojista = new event_dlgVendaLojista(util, ex);
            tmp_event_dlgVendaLojista.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgVendaLojista"] = tmp_event_dlgVendaLojista;

            event_dlgLojista tmp_event_dlgLojista = new event_dlgLojista(util, ex);
            tmp_event_dlgLojista.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgLojista"] = tmp_event_dlgLojista;

            event_dlgFatRecManual tmp_event_dlgFatRecManual = new event_dlgFatRecManual(util, ex);
            tmp_event_dlgFatRecManual.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFatRecManual"] = tmp_event_dlgFatRecManual;

            event_dlgResPend tmp_event_dlgResPend = new event_dlgResPend(util, ex);
            tmp_event_dlgResPend.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgResPend"] = tmp_event_dlgResPend;

            event_dlgNovoDependente tmp_event_dlgNovoDependente = new event_dlgNovoDependente(util, ex);
            tmp_event_dlgNovoDependente.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovoDependente"] = tmp_event_dlgNovoDependente;

            event_dlgUpdate tmp_event_dlgUpdate = new event_dlgUpdate(util, ex);
            tmp_event_dlgUpdate.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgUpdate"] = tmp_event_dlgUpdate;

            event_dlgConfFinalRepasse tmp_event_dlgConfFinalRepasse = new event_dlgConfFinalRepasse(util, ex);
            tmp_event_dlgConfFinalRepasse.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConfFinalRepasse"] = tmp_event_dlgConfFinalRepasse;

            event_dlgConfirmarRepasse tmp_event_dlgConfirmarRepasse = new event_dlgConfirmarRepasse(util, ex);
            tmp_event_dlgConfirmarRepasse.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConfirmarRepasse"] = tmp_event_dlgConfirmarRepasse;

            event_dlgCompensaCheque tmp_event_dlgCompensaCheque = new event_dlgCompensaCheque(util, ex);
            tmp_event_dlgCompensaCheque.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCompensaCheque"] = tmp_event_dlgCompensaCheque;

            event_dlgConsultaGift tmp_event_dlgConsultaGift = new event_dlgConsultaGift(util, ex);
            tmp_event_dlgConsultaGift.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaGift"] = tmp_event_dlgConsultaGift;

            event_dlgRecargaGift tmp_event_dlgRecargaGift = new event_dlgRecargaGift(util, ex);
            tmp_event_dlgRecargaGift.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgRecargaGift"] = tmp_event_dlgRecargaGift;

            event_dlgFinalGift tmp_event_dlgFinalGift = new event_dlgFinalGift(util, ex);
            tmp_event_dlgFinalGift.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFinalGift"] = tmp_event_dlgFinalGift;

            event_dlgQuiosque tmp_event_dlgQuiosque = new event_dlgQuiosque(util, ex);
            tmp_event_dlgQuiosque.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgQuiosque"] = tmp_event_dlgQuiosque;

            event_dlgConfGiftCard tmp_event_dlgConfGiftCard = new event_dlgConfGiftCard(util, ex);
            tmp_event_dlgConfGiftCard.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConfGiftCard"] = tmp_event_dlgConfGiftCard;

            event_dlgExtrasGift tmp_event_dlgExtrasGift = new event_dlgExtrasGift(util, ex);
            tmp_event_dlgExtrasGift.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgExtrasGift"] = tmp_event_dlgExtrasGift;

            event_dlgCustoChamado tmp_event_dlgCustoChamado = new event_dlgCustoChamado(util, ex);
            tmp_event_dlgCustoChamado.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCustoChamado"] = tmp_event_dlgCustoChamado;

            event_dlgEditaChamado tmp_event_dlgEditaChamado = new event_dlgEditaChamado(util, ex);
            tmp_event_dlgEditaChamado.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgEditaChamado"] = tmp_event_dlgEditaChamado;

            event_dlgPesquisaChamado tmp_event_dlgPesquisaChamado = new event_dlgPesquisaChamado(util, ex);
            tmp_event_dlgPesquisaChamado.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgPesquisaChamado"] = tmp_event_dlgPesquisaChamado;

            event_dlgNovoChamado tmp_event_dlgNovoChamado = new event_dlgNovoChamado(util, ex);
            tmp_event_dlgNovoChamado.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovoChamado"] = tmp_event_dlgNovoChamado;

            event_dlgDadosCadastrais tmp_event_dlgDadosCadastrais = new event_dlgDadosCadastrais(util, ex);
            tmp_event_dlgDadosCadastrais.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgDadosCadastrais"] = tmp_event_dlgDadosCadastrais;

            event_dlgFatRel tmp_event_dlgFatRel = new event_dlgFatRel(util, ex);
            tmp_event_dlgFatRel.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFatRel"] = tmp_event_dlgFatRel;

            event_dlgRecebeArqBanco tmp_event_dlgRecebeArqBanco = new event_dlgRecebeArqBanco(util, ex);
            tmp_event_dlgRecebeArqBanco.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgRecebeArqBanco"] = tmp_event_dlgRecebeArqBanco;

            event_dlgFatGerarArquivo tmp_event_dlgFatGerarArquivo = new event_dlgFatGerarArquivo(util, ex);
            tmp_event_dlgFatGerarArquivo.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFatGerarArquivo"] = tmp_event_dlgFatGerarArquivo;

            event_dlgSegundaVia tmp_event_dlgSegundaVia = new event_dlgSegundaVia(util, ex);
            tmp_event_dlgSegundaVia.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgSegundaVia"] = tmp_event_dlgSegundaVia;

            event_dlgCancelaDespesa tmp_event_dlgCancelaDespesa = new event_dlgCancelaDespesa(util, ex);
            tmp_event_dlgCancelaDespesa.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCancelaDespesa"] = tmp_event_dlgCancelaDespesa;

            event_dlgFatExtra tmp_event_dlgFatExtra = new event_dlgFatExtra(util, ex);
            tmp_event_dlgFatExtra.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFatExtra"] = tmp_event_dlgFatExtra;

            event_dlgFaturamento tmp_event_dlgFaturamento = new event_dlgFaturamento(util, ex);
            tmp_event_dlgFaturamento.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFaturamento"] = tmp_event_dlgFaturamento;

            event_dlgAdminEmpresas tmp_event_dlgAdminEmpresas = new event_dlgAdminEmpresas(util, ex);
            tmp_event_dlgAdminEmpresas.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgAdminEmpresas"] = tmp_event_dlgAdminEmpresas;

            event_dlgEduSegundaVia tmp_event_dlgEduSegundaVia = new event_dlgEduSegundaVia(util, ex);
            tmp_event_dlgEduSegundaVia.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgEduSegundaVia"] = tmp_event_dlgEduSegundaVia;

            event_dlgEduCancelarCartao tmp_event_dlgEduCancelarCartao = new event_dlgEduCancelarCartao(util, ex);
            tmp_event_dlgEduCancelarCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgEduCancelarCartao"] = tmp_event_dlgEduCancelarCartao;

            event_dlgConfCartao tmp_event_dlgConfCartao = new event_dlgConfCartao(util, ex);
            tmp_event_dlgConfCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConfCartao"] = tmp_event_dlgConfCartao;

            event_dlgExpedicao tmp_event_dlgExpedicao = new event_dlgExpedicao(util, ex);
            tmp_event_dlgExpedicao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgExpedicao"] = tmp_event_dlgExpedicao;

            event_dlgHabilitarCartao tmp_event_dlgHabilitarCartao = new event_dlgHabilitarCartao(util, ex);
            tmp_event_dlgHabilitarCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgHabilitarCartao"] = tmp_event_dlgHabilitarCartao;

            event_dlgDesbloqueio tmp_event_dlgDesbloqueio = new event_dlgDesbloqueio(util, ex);
            tmp_event_dlgDesbloqueio.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgDesbloqueio"] = tmp_event_dlgDesbloqueio;

            event_dlgBloqueio tmp_event_dlgBloqueio = new event_dlgBloqueio(util, ex);
            tmp_event_dlgBloqueio.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgBloqueio"] = tmp_event_dlgBloqueio;

            event_dlgEducacional tmp_event_dlgEducacional = new event_dlgEducacional(util, ex);
            tmp_event_dlgEducacional.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgEducacional"] = tmp_event_dlgEducacional;

            event_dlgFechamento tmp_event_dlgFechamento = new event_dlgFechamento(util, ex);
            tmp_event_dlgFechamento.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgFechamento"] = tmp_event_dlgFechamento;

            event_dlgCadastroAtividade tmp_event_dlgCadastroAtividade = new event_dlgCadastroAtividade(util, ex);
            tmp_event_dlgCadastroAtividade.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCadastroAtividade"] = tmp_event_dlgCadastroAtividade;

            event_dlgAgendamento tmp_event_dlgAgendamento = new event_dlgAgendamento(util, ex);
            tmp_event_dlgAgendamento.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgAgendamento"] = tmp_event_dlgAgendamento;

            event_dlgRelatorios tmp_event_dlgRelatorios = new event_dlgRelatorios(util, ex);
            tmp_event_dlgRelatorios.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgRelatorios"] = tmp_event_dlgRelatorios;

            event_dlgCancelaVendaPayFone tmp_event_dlgCancelaVendaPayFone = new event_dlgCancelaVendaPayFone(util, ex);
            tmp_event_dlgCancelaVendaPayFone.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCancelaVendaPayFone"] = tmp_event_dlgCancelaVendaPayFone;

            event_dlgVendaEmpresarialCancelamento tmp_event_dlgVendaEmpresarialCancelamento = new event_dlgVendaEmpresarialCancelamento(util, ex);
            tmp_event_dlgVendaEmpresarialCancelamento.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgVendaEmpresarialCancelamento"] = tmp_event_dlgVendaEmpresarialCancelamento;

            event_dlgSelecionaTerminal tmp_event_dlgSelecionaTerminal = new event_dlgSelecionaTerminal(util, ex);
            tmp_event_dlgSelecionaTerminal.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgSelecionaTerminal"] = tmp_event_dlgSelecionaTerminal;

            event_dlgVendaEmpresarial tmp_event_dlgVendaEmpresarial = new event_dlgVendaEmpresarial(util, ex);
            tmp_event_dlgVendaEmpresarial.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgVendaEmpresarial"] = tmp_event_dlgVendaEmpresarial;

            event_dlgAlterarSenhaCartao tmp_event_dlgAlterarSenhaCartao = new event_dlgAlterarSenhaCartao(util, ex);
            tmp_event_dlgAlterarSenhaCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgAlterarSenhaCartao"] = tmp_event_dlgAlterarSenhaCartao;

            event_dlgPF_CadastroLojista tmp_event_dlgPF_CadastroLojista = new event_dlgPF_CadastroLojista(util, ex);
            tmp_event_dlgPF_CadastroLojista.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgPF_CadastroLojista"] = tmp_event_dlgPF_CadastroLojista;

            event_dlgPF_CadastroCliente tmp_event_dlgPF_CadastroCliente = new event_dlgPF_CadastroCliente(util, ex);
            tmp_event_dlgPF_CadastroCliente.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgPF_CadastroCliente"] = tmp_event_dlgPF_CadastroCliente;

            event_dlgAutorizaVendaPayFone tmp_event_dlgAutorizaVendaPayFone = new event_dlgAutorizaVendaPayFone(util, ex);
            tmp_event_dlgAutorizaVendaPayFone.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgAutorizaVendaPayFone"] = tmp_event_dlgAutorizaVendaPayFone;

            event_dlgVerificaPendenciaPayFone tmp_event_dlgVerificaPendenciaPayFone = new event_dlgVerificaPendenciaPayFone(util, ex);
            tmp_event_dlgVerificaPendenciaPayFone.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgVerificaPendenciaPayFone"] = tmp_event_dlgVerificaPendenciaPayFone;

            event_dlgCancelaPendenciaPayFone tmp_event_dlgCancelaPendenciaPayFone = new event_dlgCancelaPendenciaPayFone(util, ex);
            tmp_event_dlgCancelaPendenciaPayFone.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCancelaPendenciaPayFone"] = tmp_event_dlgCancelaPendenciaPayFone;

            event_dlgGravaPendenciaPayFone tmp_event_dlgGravaPendenciaPayFone = new event_dlgGravaPendenciaPayFone(util, ex);
            tmp_event_dlgGravaPendenciaPayFone.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgGravaPendenciaPayFone"] = tmp_event_dlgGravaPendenciaPayFone;

            event_dlgConsultaTransacoes tmp_event_dlgConsultaTransacoes = new event_dlgConsultaTransacoes(util, ex);
            tmp_event_dlgConsultaTransacoes.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaTransacoes"] = tmp_event_dlgConsultaTransacoes;

            event_dlgConsultaCartao tmp_event_dlgConsultaCartao = new event_dlgConsultaCartao(util, ex);
            tmp_event_dlgConsultaCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaCartao"] = tmp_event_dlgConsultaCartao;

            event_dlgLimiteCartao tmp_event_dlgLimiteCartao = new event_dlgLimiteCartao(util, ex);
            tmp_event_dlgLimiteCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgLimiteCartao"] = tmp_event_dlgLimiteCartao;

            event_dlgLocalizacao tmp_event_dlgLocalizacao = new event_dlgLocalizacao(util, ex);
            tmp_event_dlgLocalizacao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgLocalizacao"] = tmp_event_dlgLocalizacao;

            event_dlgConsultaAuditoria tmp_event_dlgConsultaAuditoria = new event_dlgConsultaAuditoria(util, ex);
            tmp_event_dlgConsultaAuditoria.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaAuditoria"] = tmp_event_dlgConsultaAuditoria;

            event_dlgConsultaEmpresa tmp_event_dlgConsultaEmpresa = new event_dlgConsultaEmpresa(util, ex);
            tmp_event_dlgConsultaEmpresa.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaEmpresa"] = tmp_event_dlgConsultaEmpresa;

            event_dlgConsultaLoja tmp_event_dlgConsultaLoja = new event_dlgConsultaLoja(util, ex);
            tmp_event_dlgConsultaLoja.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConsultaLoja"] = tmp_event_dlgConsultaLoja;

            event_dlgConvenios tmp_event_dlgConvenios = new event_dlgConvenios(util, ex);
            tmp_event_dlgConvenios.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgConvenios"] = tmp_event_dlgConvenios;

            event_dlgManutencaoTerminal tmp_event_dlgManutencaoTerminal = new event_dlgManutencaoTerminal(util, ex);
            tmp_event_dlgManutencaoTerminal.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgManutencaoTerminal"] = tmp_event_dlgManutencaoTerminal;

            event_dlgSelecionaEmpresa tmp_event_dlgSelecionaEmpresa = new event_dlgSelecionaEmpresa(util, ex);
            tmp_event_dlgSelecionaEmpresa.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgSelecionaEmpresa"] = tmp_event_dlgSelecionaEmpresa;

            event_dlgNovoTerminal tmp_event_dlgNovoTerminal = new event_dlgNovoTerminal(util, ex);
            tmp_event_dlgNovoTerminal.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovoTerminal"] = tmp_event_dlgNovoTerminal;

            event_dlgManutencaoUsuario tmp_event_dlgManutencaoUsuario = new event_dlgManutencaoUsuario(util, ex);
            tmp_event_dlgManutencaoUsuario.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgManutencaoUsuario"] = tmp_event_dlgManutencaoUsuario;

            event_dlgNovaLoja tmp_event_dlgNovaLoja = new event_dlgNovaLoja(util, ex);
            tmp_event_dlgNovaLoja.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovaLoja"] = tmp_event_dlgNovaLoja;

            event_dlgNovaEmpresa tmp_event_dlgNovaEmpresa = new event_dlgNovaEmpresa(util, ex);
            tmp_event_dlgNovaEmpresa.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovaEmpresa"] = tmp_event_dlgNovaEmpresa;

            event_dlgCadastroUsuario tmp_event_dlgCadastroUsuario = new event_dlgCadastroUsuario(util, ex);
            tmp_event_dlgCadastroUsuario.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgCadastroUsuario"] = tmp_event_dlgCadastroUsuario;

            event_dlgPassword tmp_event_dlgPassword = new event_dlgPassword(util, ex);
            tmp_event_dlgPassword.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgPassword"] = tmp_event_dlgPassword;

            event_dlgLogin tmp_event_dlgLogin = new event_dlgLogin(util, ex);
            tmp_event_dlgLogin.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgLogin"] = tmp_event_dlgLogin;

            event_dlgNovoCartao tmp_event_dlgNovoCartao = new event_dlgNovoCartao(util, ex);
            tmp_event_dlgNovoCartao.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["dlgNovoCartao"] = tmp_event_dlgNovoCartao;

            event_MainForm tmp_event_MainForm = new event_MainForm(util, ex);
            tmp_event_MainForm.mapEvents(ref lst_layers, ref hsh_layers_events);
            hsh_layers ["MainForm"] = tmp_event_MainForm;

            Load();
                        #endif
        }