Ejemplo n.º 1
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("7");

            oNewItem          = oForm.Items.Add("Ver_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 205;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 11;
            oNewItem.ToPane   = 11;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Ver_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ver_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ver_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Data Verificação";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            /*oColumn = oColumns.Add("Ver_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
             * oColumn.TitleObject.Caption = "Verificado por";
             * oColumn.Width = 100;
             * oColumn.Editable = true;
             * oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_ENT_PENDENC");*/

            oColumn = oColumns.Add("Ver_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Verificado por";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ver_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Observações";
            oColumn.Width    = 470;
            oColumn.Editable = true;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Ver_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Ver_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_DATEVER");

            oColumn = oColumns.Item("Ver_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_VERIFPO");

            oColumn = oColumns.Item("Ver_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_VRF_OBS");
        }
Ejemplo n.º 2
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("Grade");

            oNewItem          = oForm.Items.Add("Apr_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 65;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Análise Crítica";

            oNewItem          = oForm.Items.Add("Apr_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 200;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Aprovação";

            oNewItem          = oForm.Items.Add("Apr_Text2a", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem             = oForm.Items.Item("Grade");
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Data";

            oNewItem          = oForm.Items.Add("Apr_Text2b", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 120;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Hora";

            oNewItem          = oForm.Items.Add("Apr_Text2c", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem             = oForm.Items.Item("Grade");
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 175;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Projetista";

            oNewItem          = oForm.Items.Add("Apr_Data", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Height   = 17;
            oNewItem.Width    = 80;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_DATE");

            oNewItem          = oForm.Items.Add("Apr_Hora", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 120;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            //oEditItem.DataBind.SetBound(true, "", "EditSource");
            oEditItem = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_HORA");

            oNewItem             = oForm.Items.Add("Apr_Proj", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oNewItem.Top         = oItem.Top + 35;
            oNewItem.Height      = 17;
            oNewItem.Width       = 140;
            oNewItem.Left        = 175;
            oNewItem.FromPane    = 12;
            oNewItem.ToPane      = 12;
            oNewItem.DisplayDesc = true;
            //oComboItem.DataBind.SetBound(true, "", "CombSource");
            oComboItem = ((SAPbouiCOM.ComboBox)(oNewItem.Specific));
            //oComboItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_APS_PROJT");
            //LoadResponsavelComboVals(oComboItem);

            oNewItem          = oForm.Items.Add("Apr_Ped", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 235;
            oNewItem.Width    = 100;
            oNewItem.Left     = 725;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Pedido (fechamento)";

            oNewItem          = oForm.Items.Add("Apr_Text3", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 220;
            oNewItem.Height   = 19;
            oNewItem.Width    = 50;
            oNewItem.Left     = 840;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Pedido";

            oNewItem          = oForm.Items.Add("Apr_Pedido", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 240;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 840;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Enabled  = false;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));

            oNewItem          = oForm.Items.Add("Apr_LinkPd", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            oNewItem.Top      = oItem.Top + 240;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 810;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oNewItem.Enabled  = true;
            oLink             = ((SAPbouiCOM.LinkedButton)(oNewItem.Specific));
            //oLink.LinkedObject = "Apr_Pedido";

            oNewItem          = oForm.Items.Add("Apr_Ctr", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 300;
            oNewItem.Width    = 100;
            oNewItem.Left     = 725;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Gerar Contrato(s)";

            oNewItem          = oForm.Items.Add("Apr_Text4", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 285;
            oNewItem.Height   = 19;
            oNewItem.Width    = 55;
            oNewItem.Left     = 840;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Contrato(s)";

            oNewItem          = oForm.Items.Add("Apr_Contr", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 305;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 840;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));



            oNewItem          = oForm.Items.Add("Apr_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 420;
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Height   = 110;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Apr_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Apr_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Detalhamento";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Apr_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Id";
            oColumn.Editable            = true;
            oColumn.Visible             = false;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Apr_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");
            oColumn = oColumns.Item("Apr_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ANC_DETALHA");
            oColumn = oColumns.Item("Apr_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "Line");

            oNewItem          = oForm.Items.Add("NvAnalise", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Width    = 140;
            oNewItem.Left     = oForm.Width - 270;
            oNewItem.Height   = 21;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Nova análise crítica";


            oNewItem = oForm.Items.Add("Ans_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            SAPbouiCOM.Item teste = oForm.Items.Item("Apr_Amb");
            oNewItem.Left     = oForm.Width - 270;
            oNewItem.Width    = 200;
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Height   = 110;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ans_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Analise Crítica";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ans_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Id";
            oColumn.Editable            = true;
            oColumn.Visible             = false;

            DBDSflx = oForm.DataSources.DBDataSources.Add("@FLX_FB_CONFMED");
            oForm.DataSources.DataTables.Add("oDataTableAnalise");
            oForm.DataSources.DataTables.Item("oDataTableAnalise").ExecuteQuery("SELECT * FROM [@FLX_FB_ANLCRI] where U_FLX_FB_ANLCRI_ID = '1' and U_FLX_FB_ANLCRI_AMBI = '1'");

            oColumn = oColumns.Item("Ans_Amb_C0");
            oColumn.DataBind.Bind("oDataTableAnalise", "U_FLX_FB_ANLCRI_ANEX");

            oColumn = oColumns.Item("Ans_Amb_C1");
            oColumn.DataBind.Bind("oDataTableAnalise", "Code");



            oNewItem          = oForm.Items.Add("Apv_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 700;
            oNewItem.Top      = oItem.Top + 220;
            oNewItem.Height   = 110;
            oNewItem.FromPane = 12;
            oNewItem.ToPane   = 12;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Apv_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Apv_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Aprovado por";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Apv_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Data Aprovação";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Apv_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "PDFs visto com o cliente";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Apv_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Prancha de Imagem";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Apv_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Memorial Descritivo";
            oColumn.Width    = 130;
            oColumn.Editable = true;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Apv_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Apv_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_APROVAD");

            oColumn = oColumns.Item("Apv_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_DATAAPR");

            oColumn = oColumns.Item("Apv_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_PDFCLIE");

            oColumn = oColumns.Item("Apv_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_PRANIMG");

            oColumn = oColumns.Item("Apv_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_APR_MEMDESC");
        }
Ejemplo n.º 3
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("7");

            oNewItem          = oForm.Items.Add("Ped_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 50;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 13;
            oNewItem.ToPane   = 13;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Ped_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ped_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ped_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Data Pedido";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "No.Pedido";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ordem de Compra";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Valor";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Solicitante";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Prazo Entrega";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Anexo (pedido impresso)";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ped_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "URL";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Ped_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Ped_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_DATE");

            oColumn = oColumns.Item("Ped_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_NPEDIDO");

            oColumn = oColumns.Item("Ped_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_ORDENDE");

            oColumn = oColumns.Item("Ped_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_VALOR");

            oColumn = oColumns.Item("Ped_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_SOLICIT");

            oColumn = oColumns.Item("Ped_Amb_C6");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_PRAZOEN");

            oColumn = oColumns.Item("Ped_Amb_C7");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_ANEXOPE");

            oColumn = oColumns.Item("Ped_Amb_C8");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_PED_URL");
        }
Ejemplo n.º 4
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("Grade");

            oNewItem          = oForm.Items.Add("Ela_Cot", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 30;
            oNewItem.Width    = 150;
            oNewItem.Left     = 730;
            oNewItem.Height   = 19;
            oNewItem.FromPane = 11;
            oNewItem.ToPane   = 11;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Gerar Orçamento...";

            oNewItem          = oForm.Items.Add("Ela_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 30;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 11;
            oNewItem.ToPane   = 11;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Elaboração do projeto";

            oNewItem          = oForm.Items.Add("Ela_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 185;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 11;
            oNewItem.ToPane   = 11;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Verificação do projeto";

            oNewItem          = oForm.Items.Add("Ela_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 50;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 11;
            oNewItem.ToPane   = 11;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Ela_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ela_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            /*oColumn = oColumns.Add("Ela_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
             * oColumn.TitleObject.Caption = "Revisão";
             * oColumn.Width = 60;
             * oColumn.Editable = true;*/

            oColumn = oColumns.Add("Ela_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Revisão";
            oColumn.Width    = 60;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ela_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Projetista";
            oColumn.Width       = 100;
            oColumn.Editable    = true;
            oColumn.DisplayDesc = true;


            oColumn = oColumns.Add("Ela_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Início Prev";
            oColumn.Width    = 90;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ela_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Término Prev";
            oColumn.Width    = 90;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oColumn = oColumns.Add("Ela_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Início Realiz";
            oColumn.Width    = 90;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oColumn = oColumns.Add("Ela_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Término Realiz";
            oColumn.Width    = 90;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oColumn = oColumns.Add("Ela_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Arquivos CAD";
            oColumn.Width    = 120;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oColumn = oColumns.Add("Ela_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Arquivos PRJ";
            oColumn.Width    = 120;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oColumn = oColumns.Add("Ela_Amb_C9", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Arquivos JPG";
            oColumn.Width    = 120;
            oColumn.Editable = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_VRF_OBS");

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Ela_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Ela_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_REVISAO");

            oColumn = oColumns.Item("Ela_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_PROJETI");

            oColumn = oColumns.Item("Ela_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_INICIOP");

            oColumn = oColumns.Item("Ela_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_TERMINP");

            oColumn = oColumns.Item("Ela_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_INICIOR");

            oColumn = oColumns.Item("Ela_Amb_C6");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_TERMINR");

            oColumn = oColumns.Item("Ela_Amb_C7");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQCAD");

            oColumn = oColumns.Item("Ela_Amb_C8");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQPRJ");

            oColumn = oColumns.Item("Ela_Amb_C9");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ELB_ARQJPG");
        }
Ejemplo n.º 5
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("Grade");

            oNewItem          = oForm.Items.Add("Fab_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 30;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 15;
            oNewItem.ToPane   = 15;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Recebimento dos Ambientes";

            oNewItem          = oForm.Items.Add("Fab_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 185;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 15;
            oNewItem.ToPane   = 15;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Registro de Avarias";

            oNewItem          = oForm.Items.Add("Fab_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 480;
            oNewItem.Top      = oItem.Top + 50;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 15;
            oNewItem.ToPane   = 15;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Fab_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Fab_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            /*oColumn = oColumns.Add("Fab_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
             * oColumn.TitleObject.Caption = "Expedição";
             * oColumn.Width = 80;
             * oColumn.Editable = true;*/

            oColumn = oColumns.Add("Fab_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Expedição";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            /*oColumn = oColumns.Add("Fab_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
             * oColumn.TitleObject.Caption = "Recebimento";
             * oColumn.Width = 80;
             * oColumn.Editable = true;*/

            oColumn = oColumns.Add("Fab_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Recebimento";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Fab_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Conferente";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Fab_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "IdAmbiente";
            oColumn.Width    = 80;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery(
                "SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 " +
                "INNER JOIN OOIN T1 ON T1.Num = T0.IntId " +
                "WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Fab_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Fab_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_EXPEDIC");

            oColumn = oColumns.Item("Fab_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_RECEBIM");

            oColumn = oColumns.Item("Fab_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_FAB_CONFERE");

            oColumn = oColumns.Item("Fab_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "Line");


            oNewItem          = oForm.Items.Add("Ava_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 680;
            oNewItem.Top      = oItem.Top + 205;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 15;
            oNewItem.ToPane   = 15;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Ava_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Ava_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Descrição";
            oColumn.Width    = 600;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Ava_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "id";
            oColumn.Width    = 600;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Add("oDataTableAvr");
            oForm.DataSources.DataTables.Item("oDataTableAvr").ExecuteQuery("select * from [@FLX_FB_AVR] where U_FLX_FB_AVR_IDOOPR = '1' and U_FLX_FB_AVR_IDAMBI = '1'");

            oColumn = oColumns.Item("Ava_Amb_C0");
            oColumn.DataBind.Bind("oDataTableAvr", "U_FLX_FB_AVR_DESC");

            oColumn = oColumns.Item("Ava_Amb_C1");
            oColumn.DataBind.Bind("oDataTableAvr", "Code");
        }
Ejemplo n.º 6
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("Grade");

            oNewItem          = oForm.Items.Add("Det_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 30;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 14;
            oNewItem.ToPane   = 14;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Detalhamento do Projeto";

            oNewItem          = oForm.Items.Add("Det_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 185;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 14;
            oNewItem.ToPane   = 14;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Itens Complementares";

            oNewItem          = oForm.Items.Add("Det_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 860;
            oNewItem.Top      = oItem.Top + 50;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 14;
            oNewItem.ToPane   = 14;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Det_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Det_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Det_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Projetista";
            oColumn.Width       = 120;
            oColumn.Editable    = true;
            oColumn.DisplayDesc = true;
            //oColumn.DataBind.SetBound(true, "OPR4", "U_FLX_FB_ENT_PENDENC");

            oColumn = oColumns.Add("Det_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Início Previsto";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Det_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Término Previsto";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Det_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Início Realizado";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Det_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Término Realzado";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Det_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "PDFs Detalhamento";
            oColumn.Width    = 200;
            oColumn.Editable = true;
            oColumn.DataBind.SetBound(true, "@FLX_FB_CONFMED", "U_FLX_FB_CONFMED_PRJ");

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Det_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Det_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_PROJETI");

            oColumn = oColumns.Item("Det_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_INICIOP");

            oColumn = oColumns.Item("Det_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_TERMINP");

            oColumn = oColumns.Item("Det_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_INICIRE");

            oColumn = oColumns.Item("Det_Amb_C6");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_TERMINO");

            oColumn = oColumns.Item("Det_Amb_C7");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_DET_PDF");



            oNewItem          = oForm.Items.Add("Det_Cmp", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 205;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 14;
            oNewItem.ToPane   = 14;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Cmp_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Cmp_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Item";
            oColumn.Width    = 40;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Cmp_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Descrição";
            oColumn.Width    = 200;
            oColumn.Editable = true;
            oColumn.DataBind.SetBound(true, "", "dt");
            oColumn.ChooseFromListUID   = "CFL1";
            oColumn.ChooseFromListAlias = "ItemName";

            oColumn = oColumns.Add("Cmp_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Estoque";
            oColumn.Width    = 70;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Cmp_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Qtd";
            oColumn.Width    = 40;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Cmp_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "IdFornecedor";
            oColumn.Width    = 40;
            oColumn.Editable = false;
            oColumn.Visible  = false;

            oColumn = oColumns.Add("Cmp_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Fornecedor";
            oColumn.Width    = 150;
            oColumn.Editable = true;
            oColumn.DataBind.SetBound(true, "", "dt");
            oColumn.ChooseFromListUID   = "CFL2";
            oColumn.ChooseFromListAlias = "CardName";

            oColumn = oColumns.Add("Cmp_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Observação";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Cmp_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "id";
            oColumn.Width    = 120;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Add("oDataTableItc");
            oForm.DataSources.DataTables.Item("oDataTableItc").ExecuteQuery("select T1.ItemCode, T1.ItemName, T1.OnHand, T0.U_FLX_FB_ITC_QTD, T2.CardCode, T2.CardName, T0.U_FLX_FB_ITC_OBS, T0.Code from [@FLX_FB_ITC] T0 inner join OITM T1 on T1.ItemCode = T0.U_FLX_FB_ITC_IDOITM inner join OCRD T2 on T2.CardCode = T0.U_FLX_FB_ITC_IDOCRD where T0.U_FLX_FB_ITC_IDOOPR = '1'");

            oColumn = oColumns.Item("Cmp_Amb_C0");
            oColumn.DataBind.Bind("oDataTableItc", "ItemCode");
            oColumn = oColumns.Item("Cmp_Amb_C1");
            oColumn.DataBind.Bind("oDataTableItc", "ItemName");
            oColumn = oColumns.Item("Cmp_Amb_C4");
            oColumn.DataBind.Bind("oDataTableItc", "OnHand");
            oColumn = oColumns.Item("Cmp_Amb_C2");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_QTD");
            oColumn = oColumns.Item("Cmp_Amb_C6");
            oColumn.DataBind.Bind("oDataTableItc", "CardCode");
            oColumn = oColumns.Item("Cmp_Amb_C3");
            oColumn.DataBind.Bind("oDataTableItc", "CardName");
            oColumn = oColumns.Item("Cmp_Amb_C5");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_OBS");
            oColumn = oColumns.Item("Cmp_Amb_C7");
            oColumn.DataBind.Bind("oDataTableItc", "Code");
        }
Ejemplo n.º 7
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("7");

            oNewItem          = oForm.Items.Add("Etg_TextY", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Height   = 19;
            oNewItem.Width    = 150;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Declaração de conformidade: ";

            oNewItem          = oForm.Items.Add("Etg_Dec_An", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Height   = 17;
            oNewItem.Width    = 250;
            oNewItem.Left     = 170;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_ENT_DECLARA");

            oNewItem          = oForm.Items.Add("Etg_Decl", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Width    = 180;
            oNewItem.Left     = 430;
            oNewItem.Height   = 20;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Nova declaração de conformidade";

            ///////////////////////////////////////////

            oNewItem          = oForm.Items.Add("Etg_Text2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Height   = 19;
            oNewItem.Width    = 150;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Pesquisa de satisfação: ";

            oNewItem          = oForm.Items.Add("Etg_Pesqu", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Height   = 17;
            oNewItem.Width    = 250;
            oNewItem.Left     = 170;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_ENT_PESQUIS");

            oNewItem          = oForm.Items.Add("Etg_Pq", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Width    = 180;
            oNewItem.Left     = 430;
            oNewItem.Height   = 20;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Nova pesquisa de satisfação";

            /////////////////////////////////////////////////////
            oNewItem          = oForm.Items.Add("Etg_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 105;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Entrega";

            oNewItem          = oForm.Items.Add("Etg_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 580;
            oNewItem.Top      = oItem.Top + 125;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Etg_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Etg_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Etg_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Entrega";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Etg_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Responsável";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Etg_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Laudo de Entrega";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Etg_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Data p/Solução";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Etg_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
            oColumn.TitleObject.Caption = "Resolvido";
            oColumn.Width       = 80;
            oColumn.Editable    = true;
            oColumn.DisplayDesc = true;
            oColumn.ValOn       = "1";
            oColumn.ValOff      = "0";

            oColumn = oColumns.Add("Etg_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Id Ambiente";
            oColumn.Width    = 30;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Etg_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Etg_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_ENTREGA");

            oColumn = oColumns.Item("Etg_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_RESPONS");

            oColumn = oColumns.Item("Etg_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_LAUDO");

            oColumn = oColumns.Item("Etg_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_DATASOL");

            oColumn = oColumns.Item("Etg_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_ENT_RESOLVI");

            oColumn = oColumns.Item("Etg_Amb_C6");
            oColumn.DataBind.Bind("oMatrixDT", "Line");

            /////////////////////////////

            //Botao Nova vistoria de entrega
            oNewItem          = oForm.Items.Add("Laudo_Ent", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 125;
            oNewItem.Width    = 200;
            oNewItem.Left     = oForm.Width - 250;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Novo laudo de vistoria de entrega";

            oNewItem          = oForm.Items.Add("Etg_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 265;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Registro de Pendências";

            oNewItem          = oForm.Items.Add("Pen_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 285;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 17;
            oNewItem.ToPane   = 17;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Pen_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Pen_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Descrição";
            oColumn.Width    = 600;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Pen_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Code";
            oColumn.Width    = 50;
            oColumn.Editable = false;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Add("oDataTablePend");
            oForm.DataSources.DataTables.Item("oDataTablePend").ExecuteQuery("select * from [@FLX_FB_PEN] where U_FLX_FB_PEN_IDOOPR = '1' and U_FLX_FB_PEN_IDAMB = '1'");

            oColumn = oColumns.Item("Pen_Amb_C0");
            oColumn.DataBind.Bind("oDataTablePend", "U_FLX_FB_PEN_DESC");

            oColumn = oColumns.Item("Pen_Amb_C1");
            oColumn.DataBind.Bind("oDataTablePend", "Code");
        }
Ejemplo n.º 8
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("7");

            oNewItem          = oForm.Items.Add("Med_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 110;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Levantamento";

            oNewItem          = oForm.Items.Add("Med_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 270;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Conferências de Medições";

            oNewItem          = oForm.Items.Add("Med_Text2a", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oItem             = oForm.Items.Item("Grade");
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Data";

            oNewItem          = oForm.Items.Add("Med_Text2b", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 120;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Hora";

            oNewItem          = oForm.Items.Add("Med_Text2c", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 17;
            oNewItem.Height   = 19;
            oNewItem.Width    = 400;
            oNewItem.Left     = 175;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Projetista";

            // Comentado campos de ligação com a tabela a partir daqui
            DBDSflx = oForm.DataSources.DBDataSources.Add("@FLX_FB_MED");

            oNewItem          = oForm.Items.Add("Med_Data", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Height   = 17;
            oNewItem.Width    = 80;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MED_DATEMED");

            oNewItem          = oForm.Items.Add("Med_Hora", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 120;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MED_HORAMED");

            oNewItem             = oForm.Items.Add("Med_Proj", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oNewItem.Top         = oItem.Top + 35;
            oNewItem.Height      = 17;
            oNewItem.Width       = 140;
            oNewItem.Left        = 175;
            oNewItem.FromPane    = 10;
            oNewItem.ToPane      = 10;
            oNewItem.DisplayDesc = true;
            oComboItem           = ((SAPbouiCOM.ComboBox)(oNewItem.Specific));


            DBDSflx           = oForm.DataSources.DBDataSources.Add("@FLX_FB_CONFMED");
            oNewItem          = oForm.Items.Add("Med_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 500;
            oNewItem.Top      = oItem.Top + 85;
            oNewItem.Height   = 110;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;

            //SBO_Application.MessageBox("PASSO 14", 1, "Ok", "", "");


            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Med_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 60;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Med_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Levantamento (anexos)";
            oColumn.Width    = 140;
            oColumn.Editable = true;
            oColumn.DataBind.SetBound(true, "@FLX_FB_CONFMED", "U_FLX_FB_CONFMED_PRJ");

            oColumn = oColumns.Add("Med_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "IdAmbiente";
            oColumn.Width    = 80;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery(
                "SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 " +
                "INNER JOIN OOIN T1 ON T1.Num = T0.IntId " +
                "WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Med_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");
            oColumn = oColumns.Item("Med_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MED_LEVANTA");
            oColumn = oColumns.Item("Med_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "Line");

            oMatrix.LoadFromDataSource();

            oNewItem          = oForm.Items.Add("NvLev", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 210;
            oNewItem.Width    = 180;
            oNewItem.Left     = 400;
            oNewItem.Height   = 19;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Novo levantamento";


            oNewItem          = oForm.Items.Add("Med_Cnf", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 300;
            oNewItem.Top      = oItem.Top + 250;
            oNewItem.Height   = 110;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;

            oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oMatrix.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Auto;
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Med_Cnf_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Data";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("med_Cnf_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Conferente";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Med_Cnf_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Id";
            oColumn.Width    = 100;
            oColumn.Editable = true;
            oColumn.Visible  = false;

            oNewItem          = oForm.Items.Add("Med_Age", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 35;
            oNewItem.Width    = 80;
            oNewItem.Left     = 430;
            oNewItem.Height   = 19;
            oNewItem.FromPane = 10;
            oNewItem.ToPane   = 10;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Agendar";

            oForm.DataSources.DataTables.Add("oDataTable");
            oForm.DataSources.DataTables.Item("oDataTable").ExecuteQuery("select * from [@FLX_FB_CONFMED] where U_FLX_FB_CONFMED_ID = '1'");

            oColumn = oColumns.Item("Med_Cnf_C0");
            oColumn.DataBind.Bind("oDataTable", "U_FLX_FB_CONFMED_DAT");
            oColumn = oColumns.Item("med_Cnf_C1");
            oColumn.DataBind.Bind("oDataTable", "U_FLX_FB_CONFMED_PRJ");
            oColumn = oColumns.Item("Med_Cnf_C2");
            oColumn.DataBind.Bind("oDataTable", "Code");
        }
Ejemplo n.º 9
0
        private void SBO_Application_MenuEvent(ref SAPbouiCOM.MenuEvent pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;

            //Matrix de Conferencia de Medicao
            if (pVal.MenuUID == "AddRowMatrixConf" && pVal.BeforeAction == true)
            {
                oNewItem = oForm.Items.Item("Med_Cnf");
                oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                oColumns = oMatrix.Columns;
                int numeroLinhas = oMatrix.RowCount;
                oMatrix.AddRow(1, numeroLinhas + 1);
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Med_Cnf_C0").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                //((SAPbouiCOM.EditText)oMatrix.Columns.Item("med_Cnf_C1").Cells.Item(oMatrix.RowCount).Specific).Value = "";
            }

            //Matrix de Conferencia de Avarias
            if (pVal.MenuUID == "AddRowMatrixAvr" && pVal.BeforeAction == true)
            {
                oNewItem = oForm.Items.Item("Ava_Amb");
                oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                oColumns = oMatrix.Columns;
                int numeroLinhas = oMatrix.RowCount;
                oMatrix.AddRow(1, numeroLinhas + 1);
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ava_Amb_C0").Cells.Item(oMatrix.RowCount).Specific).Value = "";
            }

            //Matrix de Conferencia de Avarias
            if (pVal.MenuUID == "AddRowMatrixPend" && pVal.BeforeAction == true)
            {
                oNewItem = oForm.Items.Item("Pen_Amb");
                oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                oColumns = oMatrix.Columns;
                int numeroLinhas = oMatrix.RowCount;
                oMatrix.AddRow(1, numeroLinhas + 1);
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Pen_Amb_C0").Cells.Item(oMatrix.RowCount).Specific).Value = "";
            }

            //Matrix de Itens Complementares
            if (pVal.MenuUID == "AddRowMatrixIt" && pVal.BeforeAction == true)
            {
                oNewItem = oForm.Items.Item("Det_Cmp");
                oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                oColumns = oMatrix.Columns;
                int numeroLinhas = oMatrix.RowCount;
                oMatrix.AddRow(1, numeroLinhas + 1);
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C0").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C1").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(oMatrix.RowCount).Specific).Value = "0.000000";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C2").Cells.Item(oMatrix.RowCount).Specific).Value = "0.000000";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C6").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C3").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C5").Cells.Item(oMatrix.RowCount).Specific).Value = "";
                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C7").Cells.Item(oMatrix.RowCount).Specific).Value = "";

                oMatrix.FlushToDataSource();
            }
        }
Ejemplo n.º 10
0
        private void SBO_Application_ItemEvent(string FormUID, ref SAPbouiCOM.ItemEvent pVal, out bool BubbleEvent)
        {
            SAPbouiCOM.BoEventTypes EventEnum = 0;
            EventEnum = pVal.EventType;
            BubbleEvent = true;

            if (pVal.FormType == 320)
            {
                if ((pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (!pVal.Before_Action))
                {
                    //Laudo_Ini
                    if (pVal.ItemUID == "Laudo_Ini")
                    {
                        abrirRelatorio("Laudo inicial", oForm.Items.Item("74").Specific.Value);
                    }

                    //Ent_Imp
                    if (pVal.ItemUID == "Ent_Imp")
                    {
                        abrirRelatorio("Descricao dos ambientes", oForm.Items.Item("74").Specific.Value);
                    }

                    //Laudo_Int
                    if (pVal.ItemUID == "Laudo_Int")
                    {
                        abrirRelatorio("Laudo intermediario", oForm.Items.Item("74").Specific.Value);
                    }
                    //NvAnalise
                    if (pVal.ItemUID == "NvAnalise")
                    {
                        abrirRelatorio("Analise critica", oForm.Items.Item("74").Specific.Value);
                    }
                    //Laudo_ent
                    if (pVal.ItemUID == "Laudo_Ent")
                    {
                        abrirRelatorio("Laudo de entrega", oForm.Items.Item("74").Specific.Value);
                    }
                    //Pesquisa de satisfacao
                    if (pVal.ItemUID == "Etg_Pq")
                    {
                        abrirRelatorio("Pesquisa de satisfacao", oForm.Items.Item("74").Specific.Value);
                    }
                    //NvLev
                    if (pVal.ItemUID == "NvLev")
                    {
                        abrirRelatorio("Levantamento", "");
                    }
                    //Etg_Decl
                    if (pVal.ItemUID == "Etg_Decl")
                    {
                        abrirRelatorio("Declaracao de conformidade", oForm.Items.Item("74").Specific.Value);
                    }

                }

                // Ao mudar o ambiente
                if (pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged)
                {
                    // Verifica a descricao de Ent_Det se mudou e captura
                    oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific);
                    string sEnt_Det = oEditItem.String;
                    try
                    {
                        if (sEnt_Det != sDescricaoOriginalAmbiente)
                        {
                            int idOOPR = int.Parse(((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value);
                            string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value;
                            int iSelectedValue;
                            if (selectedValue != "")
                            {
                                iSelectedValue = int.Parse(selectedValue);
                                // Atualiza a Descrição na Oportunidade de Vendas
                                AddOportunidadeVendas(idOOPR, "0", "0", "0", iSelectedValue, sEnt_Det);
                            }
                        }
                    }
                    catch
                    {
                    }
                }

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) && pVal.ItemUID == "Ent_Amb" && pVal.ItemChanged)
                {
                    oEditItem = ((SAPbouiCOM.EditText)oForm.Items.Item("Ent_Det").Specific);

                    string idOOPR = ((SAPbouiCOM.EditText)oForm.Items.Item("74").Specific).Value;
                    string selectedValue = ((SAPbouiCOM.ComboBox)oForm.Items.Item("Ent_Amb").Specific).Value;

                    ambiente = new Ambiente(idOOPR);
                    oEditItem.Value = ambiente.getDescricaoEntrevista(selectedValue);
                }

                //Evento da Drop.

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ela_Amb"))
                {
                    string coluna2 = pVal.ColUID;
                    if (coluna2 == "Ela_Amb_C2")
                    {
                        string linha = pVal.Row.ToString();
                    }
                }

                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Proj"))
                {
                    upProjEnt = true;
                    //SBO_Application.MessageBox("Mudou Proj Entrevista.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Med_Proj"))
                {
                    upProjMed = true;
                    //SBO_Application.MessageBox("Mudou Proj Medição.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Apr_Proj"))
                {
                    upProjAps = true;
                    //SBO_Application.MessageBox("Mudou Proj Apresentação.");
                }
                if (!pVal.Before_Action && (EventEnum == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "Ent_Amb"))
                {
                    upEtvAmb = true;
                    //SBO_Application.MessageBox("Mudou Combo de Ambiente");
                }

                //Abre tela de Atividades.
                if (((pVal.ItemUID == "Ent_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    bBotaoAgendarFoiClicado = true;
                    SBO_Application.ActivateMenuItem("2563");
                }

                //Abre tela de Atividades.
                if (((pVal.ItemUID == "Med_Age") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    bBotaoAgendarFoiClicado = true;
                    SBO_Application.ActivateMenuItem("2563");
                }

                //Clique do Botão Atualizar
                if (((pVal.ItemUID == "1") & (pVal.FormMode == 1) & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED) & (pVal.Before_Action == false)))
                {
                    if (ambiente.possuiAmbientesCadastrados())
                    {
                       Atualizar();
                    }
                }

                //Criar os campos do formulario.
                if (pVal.Before_Action && pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                {
                    oForm = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                    AddItemsToForm();

                    oForm.Resize(300, 130);// (132, 100);

                    resumo = new Resumo(oForm);
                    fases = new Fases(oForm);
                }

                //Evento do Clique da aba Resumo.
                if (pVal.ItemUID == "Projeto1" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    resumo.disableCampos();
                    oForm.PaneLevel = 8;
                }

                //Evento do Clique da aba Fases.
                if (pVal.ItemUID == "Projeto2" & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    oForm.PaneLevel = 9;
                }

                int panel = 9;
                if (pVal.ItemUID.StartsWith("Folder") & (pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED || pVal.EventType == SAPbouiCOM.BoEventTypes.et_CLICK) & pVal.Before_Action)
                {
                    switch (pVal.ItemUID)
                    {
                        case "Folder1": panel = 9;
                            break;
                        case "Folder2": panel = 10;
                            break;
                        case "Folder3": panel = 11;
                            break;
                        case "Folder4": panel = 12;
                            break;
                        case "Folder5": panel = 13;
                            break;
                        case "Folder6": panel = 14;
                            break;
                        case "Folder7": panel = 15;
                            break;
                        case "Folder8": panel = 16;
                            break;
                        case "Folder9": panel = 17;
                            break;
                    }

                    oForm.PaneLevel = panel;
                }

                if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST)
                {
                    SAPbouiCOM.IChooseFromListEvent oCFLEvento = ((SAPbouiCOM.IChooseFromListEvent)(pVal));
                    string sCFL_ID = oCFLEvento.ChooseFromListUID;
                    SAPbouiCOM.Form oForm = SBO_Application.Forms.Item(FormUID);
                    SAPbouiCOM.ChooseFromList oCFL = oForm.ChooseFromLists.Item(sCFL_ID);

                    if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL1")
                    {
                        SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
                        string valItemName = null;
                        string valItemCode = null;
                        try
                        {
                            valItemCode = System.Convert.ToString(oDataTable.GetValue(0, 0));
                            valItemName = System.Convert.ToString(oDataTable.GetValue(1, 0));

                            string qtdEstoque = GetQtdEmEstoque(valItemCode);
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).Value = qtdEstoque;

                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C0").Cells.Item(pVal.Row).Specific).Value = valItemCode;
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C1").Cells.Item(pVal.Row).Specific).Value = valItemName;
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                    else if (oCFLEvento.BeforeAction == false && sCFL_ID == "CFL2")
                    {
                        SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
                        string valCarName = null;
                        string idFornecedor = null;
                        try
                        {
                            idFornecedor = System.Convert.ToString(oDataTable.GetValue(0, 0));
                            valCarName = System.Convert.ToString(oDataTable.GetValue(1, 0));

                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C6").Cells.Item(pVal.Row).Specific).Value = idFornecedor;
                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C3").Cells.Item(pVal.Row).Specific).Value = valCarName;
                        }
                        catch (Exception ex)
                        {
                        }
                    }
                }

                string coluna = pVal.ColUID;

                if (EventEnum == SAPbouiCOM.BoEventTypes.et_DOUBLE_CLICK && !pVal.BeforeAction)
                {
                    //Anexo de arquivo
                    if (coluna == "Ela_Amb_C7" || coluna == "Ela_Amb_C8" || coluna == "Ela_Amb_C9" || coluna == "Med_Amb_C1"
                                               || coluna == "Apv_Amb_C3" || coluna == "Ped_Amb_C7" || coluna == "Det_Amb_C7"
                                               || coluna == "Etg_Amb_C3" || coluna == "Mon_Amb_C3" || coluna == "Mon_Amb_C4"
                                               || coluna == "Mon_Amb_C5" || coluna == "Apv_Amb_C4" || coluna == "Ans_Amb_C0")
                    {
                        oNewItem = oForm.Items.Item(pVal.ItemUID);
                        oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
                        oEditItem = (SAPbouiCOM.EditText)oMatrix.Columns.Item(coluna).Cells.Item(pVal.Row).Specific;

                        GridComAnexo(oEditItem);
                    }

                    //Url
                    if (coluna == "Ped_Amb_C8" && ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value != "")
                    {
                        newProcess = new Process();
                        string valor = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Ped_Amb_C8").Cells.Item(pVal.Row).Specific).Value;
                        info = new ProcessStartInfo(valor);
                        newProcess.StartInfo = info;
                        newProcess.Start();

                    }
                }

                if (EventEnum == SAPbouiCOM.BoEventTypes.et_LOST_FOCUS && !pVal.BeforeAction)
                {
                    if (coluna == "Cmp_Amb_C2")
                    {
                        oNewItem = oForm.Items.Item("Det_Cmp");
                        oMatrix = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                        string qtd = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C2").Cells.Item(pVal.Row).Specific).String;
                        decimal teste = Convert.ToDecimal(qtd);
                        string estoque = ((SAPbouiCOM.EditText)oMatrix.Columns.Item("Cmp_Amb_C4").Cells.Item(pVal.Row).Specific).String;
                        decimal teste2 = Convert.ToDecimal(estoque);
                        if (qtd != "" && teste > teste2)
                        {
                            SBO_Application.MessageBox("Sem ítens sufucintes no estoque");
                        }
                    }
                }

                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Apr_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0)
                {

                    if (modificouAnsCritica)
                    {
                        SBO_Application.MessageBox("Vai atualizar");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        modificouAnsCritica = false;
                    }

                    //Instancia a matriz de ambiente da aba apresentação.
                    oNewItem = oForm.Items.Item("Apr_Amb");
                    SAPbouiCOM.Matrix matrixApresentacao;
                    matrixApresentacao = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de análise crítica da aba apresentação.
                    oNewItem = oForm.Items.Item("Ans_Amb");
                    SAPbouiCOM.Matrix matrixAnaliseCritica;
                    matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores pra o ambiente na matriz de análise crítica.
                    oColumnsAnaliseCritica = matrixAnaliseCritica.Columns;
                    oColumnAnaliseCritica = oColumnsAnaliseCritica.Item("Ans_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C2").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixApresentacao.Columns.Item("Apr_Amb_C0").Cells.Item(pVal.Row).Specific;
                    idAmbiente = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    //Mostra na matriz de análise crítica qual ambiente selecionado.
                    oColumnAnaliseCritica.TitleObject.Caption = "Analise Crítica (" + nomeGrid + ")";
                    LoadGridAnaliseCritica();
                    countMatrixAnaliseCriticaAntes = matrixAnaliseCritica.RowCount;

                    if (matrixAnaliseCritica.RowCount == 0)
                    {
                        matrixAnaliseCritica.AddRow(1, 1);
                    }
                }
                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Ans_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ans_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Ans_Amb");
                    SAPbouiCOM.Matrix matrixAnaliseCritica;
                    matrixAnaliseCritica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixAnaliseCritica.RowCount > 0 && nome != "")
                    {
                        matrixAnaliseCritica.AddRow(1, matrixAnaliseCritica.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C0").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixAnaliseCritica.Columns.Item("Ans_Amb_C1").Cells.Item(matrixAnaliseCritica.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Ans_Amb" && pVal.ColUID == "Ans_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste");
                    modificouAnsCritica = true;
                }

                if (!pVal.BeforeAction && pVal.ItemUID == "Fab_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Fab_#" && pVal.Row > 0)
                {
                    if (bGravouAvarias)
                    {
                        SBO_Application.MessageBox("Vai atualizar Avarias");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        bGravouAvarias = false;
                    }

                    oNewItem = oForm.Items.Item("Fab_Amb");
                    SAPbouiCOM.Matrix matrixFabrica;
                    matrixFabrica = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oNewItem = oForm.Items.Item("Ava_Amb");
                    SAPbouiCOM.Matrix matrixAvarias;
                    matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    SAPbouiCOM.Columns oColumnsAvarias = null;
                    SAPbouiCOM.Column oColumnAvarias = null;
                    oColumnsAvarias = matrixAvarias.Columns;
                    oColumnAvarias = oColumnsAvarias.Item("Ava_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C4").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixFabrica.Columns.Item("Fab_Amb_C0").Cells.Item(pVal.Row).Specific;
                    iRowAmbiente = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    oColumnAvarias.TitleObject.Caption = "Descrição (" + nomeGrid + ")";
                    LoadGridAvarias();
                    countMatrixAvariasAntes = matrixAvarias.RowCount;

                    if (matrixAvarias.RowCount == 0)
                    {
                        matrixAvarias.AddRow(1, 1);
                    }
                }

                if (!pVal.BeforeAction && pVal.ItemUID == "Ava_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Ava_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Ava_Amb");
                    SAPbouiCOM.Matrix matrixAvarias;
                    matrixAvarias = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixAvarias.RowCount > 0 && nome != "")
                    {
                        matrixAvarias.AddRow(1, matrixAvarias.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C0").Cells.Item(matrixAvarias.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixAvarias.Columns.Item("Ava_Amb_C1").Cells.Item(matrixAvarias.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Ava_Amb" && pVal.ColUID == "Ava_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste Avarias");
                    bGravouAvarias = true;
                }

                //Evento da grid de ambiente/conferência medições.
                if (!pVal.BeforeAction && pVal.ItemUID == "Med_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "#" && pVal.Row > 0)
                {
                    //Instancia a matriz de ambiente da aba medições.
                    oNewItem = oForm.Items.Item("Med_Amb");
                    SAPbouiCOM.Matrix matrixMedicoes;
                    matrixMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de conferência medições da aba medições.
                    oNewItem = oForm.Items.Item("Med_Cnf");
                    SAPbouiCOM.Matrix matrixConferenciaMedicoes;
                    matrixConferenciaMedicoes = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores para o ambiente na matriz de conferência medições.
                    oColumnsConferenciaMedicoes = matrixConferenciaMedicoes.Columns;
                    oColumnConferenciaMedicoes = oColumnsConferenciaMedicoes.Item("med_Cnf_C1");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C2").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixMedicoes.Columns.Item("Med_Amb_C0").Cells.Item(pVal.Row).Specific;
                    iIdAmbienteMedicao = int.Parse(oEditItem.String);
                    string nomeGrid = oItemGrid.String;

                    //Mostra na matriz de conferência medições qual ambiente selecionado.
                    oColumnConferenciaMedicoes.TitleObject.Caption = "Conferente (" + nomeGrid + ")";
                    LoadGridConferenciaMedicao();
                    countMatrixConfMedAntes = matrixConferenciaMedicoes.RowCount;

                    if (matrixConferenciaMedicoes.RowCount == 0)
                    {
                        matrixConferenciaMedicoes.AddRow(1, 1);
                        //Projetistas - Grid Conferencia de Medicao
                        loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas);
                    }
                }
                //Evento da grid de ambiente/conferência medições.
                if (pVal.CharPressed == 9 && !pVal.BeforeAction && pVal.ItemUID == "Med_Cnf" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "med_Cnf_C1")
                {
                    oNewItem = oForm.Items.Item("Med_Cnf");
                    SAPbouiCOM.Matrix matrixConferenciaMedicao;
                    matrixConferenciaMedicao = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific;
                    string data = oEditItem.String;
                    SAPbouiCOM.ComboBox combo = (SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific;
                    string nome = combo.Value;

                    if (matrixConferenciaMedicao.RowCount > 0 && data != "" && nome != "")
                    {
                        matrixConferenciaMedicao.AddRow(1, matrixConferenciaMedicao.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C0").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = "";
                        //Projetistas - Grid Conferencia de Medicao
                        RemoveValoresDeCombo(ref combo);
                        loadComboEmGrid("Med_Cnf", "med_Cnf_C1", projetistas);
                        ((SAPbouiCOM.ComboBox)matrixConferenciaMedicao.Columns.Item("med_Cnf_C1").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Select("", SAPbouiCOM.BoSearchKey.psk_ByValue);
                        ((SAPbouiCOM.EditText)matrixConferenciaMedicao.Columns.Item("Med_Cnf_C2").Cells.Item(matrixConferenciaMedicao.RowCount).Specific).Value = "";

                    }
                }

                //Evento da grid de Entrega
                if (!pVal.BeforeAction && pVal.ItemUID == "Etg_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_CLICK && pVal.ColUID == "Etg_#" && pVal.Row > 0)
                {

                    if (modificouPendecia)
                    {
                        SBO_Application.MessageBox("Vai atualizar Pendencia");
                        Atualizar();
                        oForm.Mode = SAPbouiCOM.BoFormMode.fm_OK_MODE;
                        modificouPendecia = false;
                    }

                    //Instancia a matriz de ambiente da aba apresentação.
                    oNewItem = oForm.Items.Item("Etg_Amb");
                    SAPbouiCOM.Matrix matrixEntrega;
                    matrixEntrega = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Instancia a matriz de análise crítica da aba apresentação.
                    oNewItem = oForm.Items.Item("Pen_Amb");
                    SAPbouiCOM.Matrix matrixPendencia;
                    matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    //Pega a coluna onde vai setar os valores pra o ambiente na matriz de Pendencia.
                    oColumnsPendencia = matrixPendencia.Columns;
                    oColumnPendencia = oColumnsPendencia.Item("Pen_Amb_C0");

                    //Pega o id do ambiente e a descrição do ambiente.
                    oEditItem = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C6").Cells.Item(pVal.Row).Specific;
                    SAPbouiCOM.EditText oItemGrid = (SAPbouiCOM.EditText)matrixEntrega.Columns.Item("Etg_Amb_C0").Cells.Item(pVal.Row).Specific;
                    idAmbientePendencia = int.Parse(oEditItem.String);
                    string nomeAmbiente = oItemGrid.String;

                    //Mostra na matriz de Pendencia qual ambiente selecionado.
                    oColumnPendencia.TitleObject.Caption = "Ambiente (" + nomeAmbiente + ")";
                    LoadGridPendencias();
                    countMatrixPendenciaAntes = matrixPendencia.RowCount;

                    if (matrixPendencia.RowCount == 0)
                    {
                        matrixPendencia.AddRow(1, 1);
                    }
                }
                //Evento da grid de ambiente/análise crítica.
                if (!pVal.BeforeAction && pVal.ItemUID == "Pen_Amb" && EventEnum == SAPbouiCOM.BoEventTypes.et_KEY_DOWN && pVal.ColUID == "Pen_Amb_C0" && pVal.CharPressed == 9)
                {
                    oNewItem = oForm.Items.Item("Pen_Amb");
                    SAPbouiCOM.Matrix matrixPendencia;
                    matrixPendencia = ((SAPbouiCOM.Matrix)(oNewItem.Specific));

                    oEditItem = (SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific;
                    string nome = oEditItem.String;

                    if (matrixPendencia.RowCount > 0 && nome != "")
                    {
                        matrixPendencia.AddRow(1, matrixPendencia.RowCount + 1);
                        ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C0").Cells.Item(matrixPendencia.RowCount).Specific).Value = "";
                        ((SAPbouiCOM.EditText)matrixPendencia.Columns.Item("Pen_Amb_C1").Cells.Item(matrixPendencia.RowCount).Specific).Value = "";
                    }
                }

                if (pVal.ItemUID == "Pen_Amb" && pVal.ColUID == "Pen_Amb_C0" && pVal.ItemChanged && !pVal.BeforeAction)
                {
                    SBO_Application.MessageBox("Teste Pendencia");
                    modificouPendecia = true;
                }
            }

            if (pVal.FormType == 651)
            {
                if (pVal.EventType != SAPbouiCOM.BoEventTypes.et_FORM_UNLOAD)
                {
                    oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                    if (pVal.ItemUID == "Ata_Ativ" & pVal.EventType == SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED & !pVal.Before_Action)
                    {
                        abrirRelatorio("Ata de reuniao", oFormAtual.Items.Item("5").Specific.Value);
                    }

                    if (!pVal.Before_Action && (pVal.EventType == SAPbouiCOM.BoEventTypes.et_COMBO_SELECT) & pVal.ItemChanged & (pVal.ItemUID == "67"))
                    {
                        if (oFormAtual.Items.Item("67").Specific.Value == "M")
                        {
                            atividade.habilitaBotaoAta();
                        }
                        else
                        {
                            atividade.desabilitaBotaoAta();
                        }
                    }

                    if (pVal.EventType == SAPbouiCOM.BoEventTypes.et_FORM_LOAD)
                    {

                        if (pVal.Before_Action)
                        {
                            atividade = new Atividade(oFormAtual);
                        }

                        if (bBotaoAgendarFoiClicado)
                        {
                            oFormPai = SBO_Application.Forms.GetFormByTypeAndCount(320, iUltimoFormTypeCount_SalesOpportunities);

                            sSalesOpportunities_Id = ((SAPbouiCOM.EditText)oFormPai.Items.Item("74").Specific).Value;
                            sBPCode = ((SAPbouiCOM.EditText)oFormPai.Items.Item("9").Specific).Value;

                            oFormAtual = SBO_Application.Forms.GetFormByTypeAndCount(pVal.FormType, pVal.FormTypeCount);

                            ((SAPbouiCOM.EditText)oFormAtual.Items.Item("9").Specific).Value = sBPCode;

                            bBotaoAgendarFoiClicado = false;
                        }
                    }
                }
            }
        }
Ejemplo n.º 11
0
        private void desenharCampos()
        {
            oItem = oForm.Items.Item("7");

            oNewItem          = oForm.Items.Add("Laudo_Text", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Height   = 19;
            oNewItem.Width    = 150;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Laudo de vistoria inicial: ";

            oNewItem          = oForm.Items.Add("Ini_An", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Height   = 17;
            oNewItem.Width    = 250;
            oNewItem.Left     = 170;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));
            //oEditItem.DataBind.SetBound(true, "OOPR", "U_FLX_FB_MTG_INICIAL");

            oNewItem          = oForm.Items.Add("Laudo_Ini", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 60;
            oNewItem.Width    = 200;
            oNewItem.Left     = 430;
            oNewItem.Height   = 20;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Novo laudo de vistoria inicial";

            oNewItem          = oForm.Items.Add("Mon_Text0", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 80;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Ambiente / Pendências";

            oNewItem          = oForm.Items.Add("Mon_Amb", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 740;
            oNewItem.Top      = oItem.Top + 100;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Mon_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Mon_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Ambiente";
            oColumn.Width    = 80;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Mon_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX);
            oColumn.TitleObject.Caption = "Responsável";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Mon_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Descrição";
            oColumn.Width    = 320;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Mon_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Anexo Vistoria Int. 1";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Mon_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Anexo Vistoria Int. 2";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Mon_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Anexo Vistoria Int. 3";
            oColumn.Width    = 120;
            oColumn.Editable = true;

            oForm.DataSources.DataTables.Item("oMatrixDT").ExecuteQuery("SELECT T1.[Num], T1.[Descript], T0.* FROM OPR4 T0 INNER JOIN OOIN T1 ON T1.Num = T0.IntId WHERE T0.[OprId] = '1'");

            oColumn = oColumns.Item("Mon_Amb_C0");
            oColumn.DataBind.Bind("oMatrixDT", "Descript");

            oColumn = oColumns.Item("Mon_Amb_C1");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_RESPONS");

            oColumn = oColumns.Item("Mon_Amb_C2");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_DESCRIC");

            oColumn = oColumns.Item("Mon_Amb_C3");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT1");

            oColumn = oColumns.Item("Mon_Amb_C4");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT2");

            oColumn = oColumns.Item("Mon_Amb_C5");
            oColumn.DataBind.Bind("oMatrixDT", "U_FLX_FB_MTG_VSTINT3");

            //Botao Nova vistoria intermediaria
            oNewItem          = oForm.Items.Add("Laudo_Int", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 230;
            oNewItem.Width    = 200;
            oNewItem.Left     = 25;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Novo laudo de vistoria intermediária";

            oNewItem          = oForm.Items.Add("Mon_OS", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 50;
            oNewItem.Width    = 100;
            oNewItem.Left     = 780;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Gerar OS";

            oNewItem          = oForm.Items.Add("Mon_Text2", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 80;
            oNewItem.Height   = 19;
            oNewItem.Width    = 60;
            oNewItem.Left     = 810;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "No. OS";

            oNewItem          = oForm.Items.Add("Mon_NoOS", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oNewItem.Top      = oItem.Top + 100;
            oNewItem.Height   = 17;
            oNewItem.Width    = 40;
            oNewItem.Left     = 810;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Enabled  = false;
            oEditItem         = ((SAPbouiCOM.EditText)(oNewItem.Specific));

            oNewItem          = oForm.Items.Add("Mon_Planej", SAPbouiCOM.BoFormItemTypes.it_BUTTON);
            oNewItem.Top      = oItem.Top + 150;
            oNewItem.Width    = 100;
            oNewItem.Left     = 780;
            oNewItem.Height   = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oButton           = ((SAPbouiCOM.Button)(oNewItem.Specific));
            oButton.Caption   = "Planejamento";

            oNewItem          = oForm.Items.Add("Mon_Text1", SAPbouiCOM.BoFormItemTypes.it_STATIC);
            oNewItem.Top      = oItem.Top + 285;
            oNewItem.Height   = 19;
            oNewItem.Width    = 350;
            oNewItem.Left     = 25;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;
            oNewItem.Visible  = true;
            oTextItem         = ((SAPbouiCOM.StaticText)(oNewItem.Specific));
            oTextItem.Caption = "Itens Complementares";

            oNewItem          = oForm.Items.Add("Mon_Itc", SAPbouiCOM.BoFormItemTypes.it_MATRIX);
            oNewItem.Left     = 25;
            oNewItem.Width    = 880;
            oNewItem.Top      = oItem.Top + 305;
            oNewItem.Height   = 120;
            oNewItem.FromPane = 16;
            oNewItem.ToPane   = 16;

            oMatrix  = ((SAPbouiCOM.Matrix)(oNewItem.Specific));
            oColumns = oMatrix.Columns;

            oColumn = oColumns.Add("Itc_#", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "#";
            oColumn.Width    = 30;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C0", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Item";
            oColumn.Width    = 40;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C1", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Descrição";
            oColumn.Width    = 200;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C8", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Estoque";
            oColumn.Width    = 40;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C2", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Qtd";
            oColumn.Width    = 40;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C3", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Fornecedor";
            oColumn.Width    = 150;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C4", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Observação";
            oColumn.Width    = 200;
            oColumn.Editable = false;

            oColumn = oColumns.Add("Itc_Amb_C5", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Prz Entrega";
            oColumn.Width    = 80;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Itc_Amb_C6", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Solicitante";
            oColumn.Width    = 100;
            oColumn.Editable = true;

            oColumn = oColumns.Add("Itc_Amb_C7", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX);
            oColumn.TitleObject.Caption = "Recebido";
            oColumn.Width       = 80;
            oColumn.Editable    = true;
            oColumn.DisplayDesc = true;
            oColumn.ValOn       = "1";
            oColumn.ValOff      = "0";

            oColumn = oColumns.Add("Itc_Amb_C9", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "idFornecedor";
            oColumn.Width    = 40;
            oColumn.Editable = false;
            oColumn.Visible  = false;

            oColumn = oColumns.Add("Itc_Amb_10", SAPbouiCOM.BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "idItensComp";
            oColumn.Width    = 40;
            oColumn.Editable = false;
            oColumn.Visible  = false;

            oForm.DataSources.DataTables.Item("oDataTableItc").ExecuteQuery("select T1.ItemCode, T1.ItemName, T1.OnHand, T0.U_FLX_FB_ITC_QTD, T2.CardCode, T2.CardName, T0.U_FLX_FB_ITC_OBS, T0.DocEntry, T0.U_FLX_FB_ITC_PRZETG, T0.U_FLX_FB_ITC_SOLICI, T0.U_FLX_FB_ITC_RECEB from [@FLX_FB_ITC] T0 inner join OITM T1 on T1.ItemCode = T0.U_FLX_FB_ITC_IDOITM inner join OCRD T2 on T2.CardCode = T0.U_FLX_FB_ITC_IDOCRD where T0.U_FLX_FB_ITC_IDOOPR = '1'");

            oColumn = oColumns.Item("Itc_Amb_C0");
            oColumn.DataBind.Bind("oDataTableItc", "ItemCode");

            oColumn = oColumns.Item("Itc_Amb_C1");
            oColumn.DataBind.Bind("oDataTableItc", "ItemName");

            oColumn = oColumns.Item("Itc_Amb_C8");
            oColumn.DataBind.Bind("oDataTableItc", "OnHand");

            oColumn = oColumns.Item("Itc_Amb_C2");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_QTD");

            oColumn = oColumns.Item("Itc_Amb_C9");
            oColumn.DataBind.Bind("oDataTableItc", "CardCode");

            oColumn = oColumns.Item("Itc_Amb_C3");
            oColumn.DataBind.Bind("oDataTableItc", "CardName");

            oColumn = oColumns.Item("Itc_Amb_C4");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_OBS");

            oColumn = oColumns.Item("Itc_Amb_10");
            oColumn.DataBind.Bind("oDataTableItc", "DocEntry");

            oColumn = oColumns.Item("Itc_Amb_C5");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_PRZETG");

            oColumn = oColumns.Item("Itc_Amb_C6");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_SOLICI");

            oColumn = oColumns.Item("Itc_Amb_C7");
            oColumn.DataBind.Bind("oDataTableItc", "U_FLX_FB_ITC_RECEB");
        }