Ejemplo n.º 1
0
        public TransferItems()
        {
            mtxItems.AutoResizeColumns();
            mtxCost.AutoResizeColumns();
            fldrItems.Select();
            //BatchesManaged = true;
            IsMandatoryBatches = false;
            Action action = new Action(delegate()
            {
                this.UIAPIRawForm.EnableMenu("1283", false);
                this.UIAPIRawForm.EnableMenu("1284", false);
                this.UIAPIRawForm.EnableMenu("1286", false);
                this.UIAPIRawForm.EnableMenu("1288", true);
                this.UIAPIRawForm.EnableMenu("1289", true);
                this.UIAPIRawForm.EnableMenu("1290", true);
                this.UIAPIRawForm.EnableMenu("1291", true);
            });

            Task.Run(action);
            txtDocNo.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Editable, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Find), SAPbouiCOM.BoModeVisualBehavior.mvb_True);
            mtxItems.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Editable, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Ok), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
            mtxCost.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Editable, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Ok), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
            //btnCalculate.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Ok), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
            //btnCalculate.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Find), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
            btnAddRow.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Ok), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
            btnAddRow.Item.SetAutoManagedAttribute(SAPbouiCOM.BoAutoManagedAttr.ama_Visible, Convert.ToInt32(SAPbouiCOM.BoAutoFormMode.afm_Find), SAPbouiCOM.BoModeVisualBehavior.mvb_False);
        }
Ejemplo n.º 2
0
        private void LoadItemMatrix()
        {
            if (pObjMtxCFL.Columns.Count == 0)
            {
                //Add columns
                pObjMtxCFL.Columns.Add("cName", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                pObjMtxCFL.Columns.Add("cDesc", SAPbouiCOM.BoFormItemTypes.it_EDIT);

                //Setup clumns
                pObjMtxCFL.Columns.Item("cName").TitleObject.Caption = "Nombre";
                pObjMtxCFL.Columns.Item("cDesc").TitleObject.Caption = "Descripción";


                pObjMtxCFL.Columns.Item("cName").Editable = false;
                pObjMtxCFL.Columns.Item("cDesc").Editable = false;

                pObjMtxCFL.SelectionMode = SAPbouiCOM.BoMatrixSelect.ms_Single;
            }
            //Bind
            pObjMtxCFL.Columns.Item("cName").DataBind.Bind("DsItems", "ItemCode");
            pObjMtxCFL.Columns.Item("cDesc").DataBind.Bind("DsItems", "ItemName");

            pObjMtxCFL.LoadFromDataSource();
            pObjMtxCFL.AutoResizeColumns();
        }
Ejemplo n.º 3
0
 public ItemAddCost()
 {
     ds = this.UIAPIRawForm.DataSources.DBDataSources.Item("@T_HOUSSAM");
     ds.Query(null);
     mtxCost.LoadFromDataSource();
     mtxCost.AutoResizeColumns();
 }
Ejemplo n.º 4
0
        private void OnCustomInitialize()
        {
            LoadEvents();

            mCmbMvType.Item.DisplayDesc = true;
            mCmbMvType.ExpandType       = SAPbouiCOM.BoExpandType.et_DescriptionOnly;

            mDtChecks = this.UIAPIRawForm.DataSources.DataTables.Item("DT_Checks");
            mDtChecks.BindToMatrix(mMtxChecks);
            mMtxChecks.AutoResizeColumns();
        }
Ejemplo n.º 5
0
        public void iniciarValoresPorDefecto()
        {
            //Conexion.application.Menus.Item(Constantes.Menu_Crear).Enabled = false;
            //Conexion.application.Menus.Item(Constantes.Menu_Buscar).Enabled = false;

            dsTipoUsuario.Clear();
            deletedEntries.Clear();

            var mListMenu = TipoUsuarioDAO.listar();

            foreach (var item in mListMenu)
            {
                dsTipoUsuario.InsertRecord(dsTipoUsuario.Size);
                insertToDS(dsTipoUsuario.Size - 1, item.docEntry.ToString(), item.codigo, item.descripcion, item.activo, item.supervisor, item.cobrador);
            }

            dsTipoUsuario.InsertRecord(dsTipoUsuario.Size);
            insertToDS(dsTipoUsuario.Size - 1, string.Empty, string.Empty, string.Empty, "Y", "N", "N");

            oMatrix.LoadFromDataSource();

            for (int i = 0; i < dsTipoUsuario.Size - 1; i++)
            {
                oMatrix.CommonSetting.SetCellEditable(i + 1, 1, false);
            }

            oMatrix.AutoResizeColumns();
            oMatrix.SetCellFocus(oMatrix.RowCount, 1);
        }
Ejemplo n.º 6
0
        private void LoadMatrix()
        {
            string lStrAccount = "2050030000000";

            try
            {
                this.UIAPIRawForm.Freeze(true);

                this.UIAPIRawForm.DataSources.DataTables.Item("DM_CC")
                .ExecuteQuery(mObjCreditCollectionDAO.GetMatrixList(mObjTxtDate.Value, mObjCbAuct.Value, lStrAccount));

                mObjSMatrix.Columns.Item("Seller").DataBind.Bind("DM_CC", "CardName");
                mObjSMatrix.Columns.Item("TotCred").DataBind.Bind("DM_CC", "TotSelled");
                mObjSMatrix.Columns.Item("TotDeb").DataBind.Bind("DM_CC", "TotDebit");
                mObjSMatrix.Columns.Item("Chck").DataBind.Bind("DM_CC", "Chk");
                mObjSMatrix.Columns.Item("OvdInv").DataBind.Bind("DM_CC", "PaidInv");

                mObjSMatrix.LoadFromDataSource();
                mObjSMatrix.AutoResizeColumns();

                DisableAutorizedCells();

                this.UIAPIRawForm.Freeze(false);
            }
            catch (Exception er)
            {
            }
            finally
            {
                //MemoryUtility.ReleaseComObject(lObjRecordSet);
            }
        }
Ejemplo n.º 7
0
        // query and populate matrix
        private void populateMatrix()
        {
            try
            {
                String strQuery = String.Format(TWM_KDS_AddOn.Src.Resource.Queries.TWM_GET_PO_MATRIX, _txtVendor.String, _txtDTFRM.Value, _txtDTTO.Value);

                _dt_VendorMatrix = _oForm.DataSources.DataTables.Item("dt_VendorfromOPOR");
                _dt_VendorMatrix.ExecuteQuery(strQuery);


                if (_dt_VendorMatrix.Rows.Count > 0)
                {
                    _mat_Vendor.Columns.Item("col_0").DataBind.Bind("dt_VendorfromOPOR", "Row");
                    _mat_Vendor.Columns.Item("colVCC").DataBind.Bind("dt_VendorfromOPOR", "CardCode");
                    _mat_Vendor.Columns.Item("colVCN").DataBind.Bind("dt_VendorfromOPOR", "CardName");
                    _mat_Vendor.Columns.Item("colCHK").DataBind.Bind("dt_VendorfromOPOR", "Check");
                    _mat_Vendor.Columns.Item("colSONO").DataBind.Bind("dt_VendorfromOPOR", "DocNum");
                    _mat_Vendor.Columns.Item("colPONO").DataBind.Bind("dt_VendorfromOPOR", "NumAtCard");
                    _mat_Vendor.Columns.Item("colDOCET").DataBind.Bind("dt_VendorfromOPOR", "DocEntry");
                    _mat_Vendor.LoadFromDataSource();
                    _mat_Vendor.AutoResizeColumns();
                }
            }
            catch (Exception ex) { eCommon.SBO_Application.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error); }
        }
Ejemplo n.º 8
0
        private void OnCustomInitialize()
        {
            try
            {
                mCmbBank.ExpandType = SAPbouiCOM.BoExpandType.et_DescriptionOnly;
                mCmbAcct.ExpandType = SAPbouiCOM.BoExpandType.et_ValueOnly;

                IList <BankDTO> lLstObjBanks = mBankDAO.GetBanks();
                foreach (BankDTO lObjBank in lLstObjBanks)
                {
                    mCmbBank.ValidValues.Add(lObjBank.BankCode, lObjBank.BankName);
                }

                mCmbAcct.ValidValues.Add("", "");

                LoadComboAuctions();

                //mObjLastAuction = mAuctionDAO.GetLastAuction();


                this.UIAPIRawForm.DataSources.DataTables.Add("SellersDataTable");
                mDtSellers = this.UIAPIRawForm.DataSources.DataTables.Item("SellersDataTable");
                mDtSellers.Columns.Add("Name", SAPbouiCOM.BoFieldsType.ft_Text);
                mDtSellers.Columns.Add("Amount", SAPbouiCOM.BoFieldsType.ft_Price);

                mMtxSellers.Columns.Item("Col_Seller").DataBind.Bind("SellersDataTable", "Name");
                mMtxSellers.Columns.Item("Col_Amount").DataBind.Bind("SellersDataTable", "Amount");
                mMtxSellers.AutoResizeColumns();

                //mObjLastAuction = mAuctionDAO.GetLastAuction();
                //if (mObjLastAuction != null)
                //{
                //    LoadSellers(mObjLastAuction.Folio);
                //    mEdtFolio.Value = mObjLastAuction.Folio;
                //}
                //else
                //{
                //    UIApplication.ShowError("No hay subastas activas.");
                //}
            }
            catch (Exception ex)
            {
                LogUtility.WriteError(string.Format("[CheckGeneration - OnCustomInitialize] Error: {0}", ex.Message));
                UIApplication.ShowMessageBox(ex.Message);
            }
        }
Ejemplo n.º 9
0
 private void setItems()
 {
     lObjMatrix = ((SAPbouiCOM.Matrix)lObjModalForm.Items.Item("MtxCert").Specific);
     lObjBtnOk  = ((SAPbouiCOM.Button)lObjModalForm.Items.Item("btnOk").Specific);
     lObjBtnCan = ((SAPbouiCOM.Button)lObjModalForm.Items.Item("btnCan").Specific);
     lObjMatrix.AutoResizeColumns();
     initMatrix();
 }
Ejemplo n.º 10
0
        private void LoadMatrixPeticiones(string pStrCliente = null)
        {
            Matrix1.Clear();
            string lStrQuery;

            if (EditText1.Value != "" || EditText1.Value != null)
            {
                if (pStrCliente == null || pStrCliente == "")
                {
                    lStrQuery = "SELECT 'N' AS Seleccionar, cast(sum(T2.OpenInvQty) as decimal(18,2)) AS Cantidad, T2.FromWhsCod AS Almacen, T2.U_CR_Cardcode AS ClienteCod, T4.CardName AS Cliente, T2.ItemCode AS ItemCode, T3.ItemName Tipo, cast(cast(sum(T2.OpenInvQty) as decimal(18,2)) as varchar(8)) AS Trans FROM OWTQ T1 INNER JOIN WTQ1 T2 ON T1.DocEntry = T2.DocEntry INNER JOIN OCRD T4 ON T4.cardcode = T2.U_CR_Cardcode INNER JOIN OITM T3 ON T3.ItemCode = T2.ItemCode  WHERE T1.DocNum = '" + EditText1.Value + "' AND T2.InvntSttus = 'O' group by T2.FromWhsCod , T2.U_CR_Cardcode , T4.CardName , T2.ItemCode , T3.ItemName";
                }

                else
                {
                    lStrQuery = "SELECT 'N' AS Seleccionar, cast(sum(T2.OpenInvQty) as decimal(18,2)) AS Cantidad, T2.FromWhsCod AS Almacen, T2.U_CR_Cardcode AS ClienteCod, T4.CardName AS Cliente, T2.ItemCode AS ItemCode, T3.ItemName Tipo, cast(cast(sum(T2.OpenInvQty) as decimal(18,2)) as varchar(8)) AS Trans FROM OWTQ T1 INNER JOIN WTQ1 T2 ON T1.DocEntry = T2.DocEntry INNER JOIN OCRD T4 ON T4.cardcode = T2.U_CR_Cardcode INNER JOIN OITM T3 ON T3.ItemCode = T2.ItemCode  WHERE T1.DocNum = '" + EditText1.Value + "' and T2.U_CR_Cardcode = '" + pStrCliente + "'  AND T2.InvntSttus = 'O' group by T2.FromWhsCod , T2.U_CR_Cardcode , T4.CardName , T2.ItemCode , T3.ItemName";
                }

                oForm.DataSources.DataTables.Item("dtMatrix").ExecuteQuery(lStrQuery);

                if (oForm.DataSources.DataTables.Item("dtMatrix").Rows.Count == 0)
                {
                    Application.SBO_Application.StatusBar.SetText("Sin resultados.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Warning);
                }
                else
                {
                    Matrix1.Columns.Item("Col_0").DataBind.Bind("dtMatrix", "Seleccionar");
                    Matrix1.Columns.Item("Col_1").DataBind.Bind("dtMatrix", "Cliente");
                    Matrix1.Columns.Item("Col_2").DataBind.Bind("dtMatrix", "Tipo");
                    Matrix1.Columns.Item("Col_3").DataBind.Bind("dtMatrix", "Almacen");
                    Matrix1.Columns.Item("Col_4").DataBind.Bind("dtMatrix", "Cantidad");
                    Matrix1.Columns.Item("Col_5").DataBind.Bind("dtMatrix", "Trans");
                    Matrix1.Columns.Item("Col_6").DataBind.Bind("dtMatrix", "ClienteCod");
                    Matrix1.Columns.Item("Col_6").Visible = false;
                    Matrix1.Columns.Item("Col_7").DataBind.Bind("dtMatrix", "ItemCode");
                    Matrix1.LoadFromDataSource();
                }
                Matrix1.AutoResizeColumns();
            }
            else
            {
                Application.SBO_Application.StatusBar.SetText("Es necesario seleccionar la solicitud de transferencia", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
        }
Ejemplo n.º 11
0
        private void initItems()
        {
            lObjMatrix = ((SAPbouiCOM.Matrix)lObjFormChargesXml.Items.Item("Item_0").Specific);
            lObjMatrix.AutoResizeColumns();
            lStrArticletoCost = lObjChargesDAO.GetArticleToInvoice();
            lDbPrice          = lObjChargesDAO.GetPrice(lStrArticletoCost, lObjChargesDAO.GetWhs(lIntUserSign));

            initSysMatrix();
            ListCorrals();
        }
Ejemplo n.º 12
0
 public frmRejectO()
 {
     LoadEvents();
     lStrMainRWhs = mObjRejectedDAO.GetMainRWhs(lIntUserSign);
     lStrMainWhs  = mObjRejectedDAO.GetMainWhs(lIntUserSign);
     LoadMatrix(lStrMainRWhs);
     lObjMtxRejectOut.AutoResizeColumns();
     AddChooseFromList();
     initCheckBox();
     ConfigForm();
     //SetSpecialDate(); --------------------------- Extra** if validation is needed
 }
Ejemplo n.º 13
0
        private void OnCustomInitialize()
        {
            oApp     = (SAPbouiCOM.Application)Application.SBO_Application;
            oCompany = (SAPbobsCOM.Company)oApp.Company.GetDICompany();
            oForm    = oApp.Forms.Item("edimatr");
            //Start();
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("Item_2").Specific));

            oDBDataSource = oForm.DataSources.DBDataSources.Item("@EDICIONESCOL");

            // Ready Matrix to populate data

            oMatrix.Clear();

            oMatrix.AutoResizeColumns();

            // Querying the DB Data source

            oDBDataSource.Query();

            // setting the user data source data

            oMatrix.LoadFromDataSource();

            oMatrix.AutoResizeColumns();

            //int i;
            //for (i = 1; i <= oMatrix.RowCount - 1; i++) ;

            //{

            //    SAPbouiCOM.EditText cellID = (SAPbouiCOM.EditText)oMatrix.GetCellSpecific("numer", i);

            //    cellID.String = i.ToString();

            //}


            oForm.Visible = true;
        }
Ejemplo n.º 14
0
    private void ShowExportSO(SAPbouiCOM.Form form, String Where = "")
    {
        string sql = "";

        try
        {
            if (form.Items.Item(MtxExportSO) == null)
            {
                return;
            }

            form.Items.Item(MtxExportSO).AffectsFormMode = false;
            oMatrixExportSO = (SAPbouiCOM.Matrix)form.Items.Item(MtxExportSO).Specific;
            oMatrixExportSO.Clear();
            oDTExportSO = getDataTableExportSo(form);
            if (Where.Equals(""))
            {
                sql = String.Format(" select 'N' as [clSel[,ROW_NUMBER() OVER (ORDER BY R.[DocEntry[) AS [ID[,R.[DocEntry[,R.[DocNum[,R.[DocDate[,R.[DocTotal[,R.[CardCode[,R.[CardName[,  IFNULL(R.[U_EbizChargeID[, '') as [EBiz[, 'False' as [Sync[  , (select Max([U_Status[) from[@CCSOLOG[where[U_DocNum[= Cast(R.[DocNum[ as nvarchar(20)))as [Status[ , (select Min([U_CreateDt[) from[@CCSOLOG[where[U_DocNum[= Cast(R.[DocNum[ as nvarchar(20)) )as [UploadDt[ , (select Max([U_UpdateDt[) from[@CCSOLOG[where[U_DocNum[= Cast(R.[DocNum[ as nvarchar(20))  )as [TransDt[ from ORDR R where R.[DocStatus[= 'O'   and IFNULL(R.[U_EbizChargeMarkPayment[, '') <> 'Paid' and R.\"DocDate\" =current_date  ").Replace("]", "\"").Replace("[", "\"");
            }
            else
            {
                var subQ = " ,( select Max([U_Status[) from [@CCSOLOG[  where [U_DocNum[=Cast(RDR.[DocNum[ as nvarchar(20)))as [Status[ ,(select Min([U_CreateDt[) from [@CCSOLOG[where[U_DocNum[= Cast(RDR.[DocNum[ as nvarchar(20)) )as [UploadDt[ , (select Max([U_UpdateDt[) from [@CCSOLOG[ where [U_DocNum[= Cast(RDR.[DocNum[ as nvarchar(20))  )as [TransDt[";
                sql = String.Format("select 'N' as ]clSel],ROW_NUMBER() OVER (ORDER BY RDR.[DocEntry]) AS ]ID],RDR.[DocEntry[,RDR.[DocNum],RDR.[DocDate],RDR.[DocTotal],RDR.[CardCode],  RDR.[CardName], IFNULL(RDR.[U_EbizChargeID], '') as ]EBiz], 'False'  as ]Sync] {1}  from ORDR RDR  inner  join OCRD C on C.[CardCode] = RDR.[CardCode]  inner  join OCRG CRG on C.[GroupCode] = CRG.[GroupCode]  INNER JOIN OCTG CTG ON C.[GroupNum] = CTG.[GroupNum]  where RDR.[DocStatus]='O'   and IFNULL(RDR.[U_EbizChargeMarkPayment],'')<>'Paid' {0}", Where, subQ).Replace("[", "\"").Replace("]", "\"");
            }

            oDTExportSO.ExecuteQuery(sql);

            BindMatrixExportSO(oMatrixExportSO, "clSel", "clSel", dtItem, true);
            BindMatrixExportSO(oMatrixExportSO, "clNo", "ID");
            BindMatrixExportSO(oMatrixExportSO, "DocNum", "DocNum");
            BindMatrixExportSO(oMatrixExportSO, "DocEntry", "DocEntry");
            BindMatrixExportSO(oMatrixExportSO, "DocDate", "DocDate");
            BindMatrixExportSO(oMatrixExportSO, "CardCode", "CardCode");
            BindMatrixExportSO(oMatrixExportSO, "CardName", "CardName");
            BindMatrixExportSO(oMatrixExportSO, "DocTotal", "DocTotal");
            BindMatrixExportSO(oMatrixExportSO, "clSync", "Sync");
            BindMatrixExportSO(oMatrixExportSO, "Status", "Status");
            BindMatrixExportSO(oMatrixExportSO, "UploadDt", "UploadDt");
            BindMatrixExportSO(oMatrixExportSO, "TransDt", "TransDt");


            oMatrixExportSO.LoadFromDataSource();
            oMatrixExportSO.AutoResizeColumns();
        }
        catch (Exception ex)
        {
            errorLog(ex);
            errorLog(sql);
        }
    }
        private static void Cargar_Datos_Matrix()
        {
            try
            {
                //oForm = Application.SBO_Application.Forms.ActiveForm;
                oDTTable = oForm.DataSources.DataTables.Item("DT_SQL1");
                SAPbouiCOM.DBDataSource source = oForm.DataSources.DBDataSources.Item("@ZDFER");

                oForm.Freeze(true);

                string sql = "SELECT * FROM [@ZDFER] ORDER BY U_Fecha";

                oDTTable.ExecuteQuery(sql);

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("3").Specific;
                oMatrix.FlushToDataSource();
                source.Clear();
                oMatrix.Clear();

                for (int i = 0; i < oDTTable.Rows.Count; i++)
                {
                    source.InsertRecord(source.Size);
                    source.Offset = source.Size - 1;
                    source.SetValue("Code", source.Size - 1, Convert.ToString(oDTTable.GetValue("Code", i)));
                    //DateTime fecha = (DateTime)oDTTable.GetValue("U_Fecha", i);
                    source.SetValue("U_Fecha", source.Size - 1, Convert.ToDateTime(oDTTable.GetValue("U_Fecha", i)).ToString("yyyyMMdd"));
                    source.SetValue("U_Descripcion", source.Size - 1, Convert.ToString(oDTTable.GetValue("U_Descripcion", i)));
                    source.SetValue("DocEntry", source.Size - 1, Convert.ToString(oDTTable.GetValue("DocEntry", i)));
                }

                sql = "SELECT MAX(CAST(Code as int)) + 1 as Proximo FROM [@ZDFER]";
                oDTTable.ExecuteQuery(sql);

                source.InsertRecord(source.Size);
                source.Offset = source.Size - 1;
                source.SetValue("Code", source.Size - 1, Convert.ToString(oDTTable.GetValue("Proximo", 0)));
                source.SetValue("DocEntry", source.Size - 1, Convert.ToString(oDTTable.GetValue("Proximo", 0)));

                oMatrix.LoadFromDataSource();
                oMatrix.AutoResizeColumns();
            }
            catch (Exception)
            {
            }
            finally
            {
                oForm.Freeze(false);
            }
        }
Ejemplo n.º 16
0
        /// <summary>
        /// Method to Set Matrix Value
        /// </summary>
        /// <param name="oForm"></param>
        /// <param name="matrixUID"></param>
        /// <param name="newValue"></param>
        /// <param name="itemUID"></param>
        /// <param name="rowIndex"></param>
        public static void SetMatrixValue(SAPbouiCOM.Form oForm, string matrixUID, string newValue, string itemUID, [Optional] int rowIndex)
        {
            try
            {
                SAPbouiCOM.Matrix oMat = (SAPbouiCOM.Matrix)oForm.Items.Item(matrixUID).Specific;

                oMat.SetCellWithoutValidation(rowIndex, itemUID, newValue);

                oMat.AutoResizeColumns();
            }
            catch (Exception ex)
            {
                PublicVariable.oApplication.StatusBar.SetText(ex.Message, SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
            }
        }
Ejemplo n.º 17
0
        /// <summary>
        ///
        /// </summary>
        private void LoadMatrix()
        {
            FillDataSource();


            lObjMatrix.Columns.Item("Col_Check").DataBind.Bind("DTMatrix", "Chk");
            //lObjMatrix.Columns.Item("Col_Folio").DataBind.Bind("DTMatrix", "Folio");
            lObjMatrix.Columns.Item("Col_Name").DataBind.Bind("DTMatrix", "CardName");
            lObjMatrix.Columns.Item("Col_Type").DataBind.Bind("DTMatrix", "ItemName");
            lObjMatrix.Columns.Item("Col_Corral").DataBind.Bind("DTMatrix", "WhsName");
            lObjMatrix.Columns.Item("Col_Heads").DataBind.Bind("DTMatrix", "Cantidad");
            lObjMatrix.Columns.Item("Col_Status").DataBind.Bind("DTMatrix", "Estatus");

            lObjMatrix.LoadFromDataSource();
            lObjMatrix.AutoResizeColumns();
        }
Ejemplo n.º 18
0
        public void GetItemReferences()
        {
            try
            {
                _btnView    = _oForm.Items.Item("btnView").Specific as SAPbouiCOM.Button;
                _txtCSTCD   = _oForm.Items.Item("txtCSTCD").Specific as SAPbouiCOM.EditText;
                _txtDTFRM   = _oForm.Items.Item("txtDTFRM").Specific as SAPbouiCOM.EditText;
                _txtDTTO    = _oForm.Items.Item("txtDTTO").Specific as SAPbouiCOM.EditText;
                _txtSrchPO  = _oForm.Items.Item("txtSrchPO").Specific as SAPbouiCOM.EditText;
                _btnNext    = _oForm.Items.Item("btnNext").Specific as SAPbouiCOM.Button;
                _btnBack    = _oForm.Items.Item("btnBack").Specific as SAPbouiCOM.Button;
                _txtTTLAMT  = _oForm.Items.Item("txtTtlAmt").Specific as SAPbouiCOM.EditText;
                _txtTTLQTY  = _oForm.Items.Item("txtTtlQty").Specific as SAPbouiCOM.EditText;
                _txtTTLCBOX = _oForm.Items.Item("txtTtlCrt").Specific as SAPbouiCOM.EditText;

                _txtNAME  = _oForm.Items.Item("txtNAME").Specific as SAPbouiCOM.EditText;
                _txtPSTDT = _oForm.Items.Item("txtPSTDT").Specific as SAPbouiCOM.EditText;
                _txtDUEDT = _oForm.Items.Item("txtDUEDT").Specific as SAPbouiCOM.EditText;
                _txtDOCDT = _oForm.Items.Item("txtDOCDT").Specific as SAPbouiCOM.EditText;
                _txtRMK   = _oForm.Items.Item("txtRMK").Specific as SAPbouiCOM.EditText;
                _cbDraft  = _oForm.Items.Item("cbDraft").Specific as SAPbouiCOM.CheckBox;
                _btnPost  = _oForm.Items.Item("btnPost").Specific as SAPbouiCOM.Button;
                _mat_CST  = _oForm.Items.Item("mat_CST").Specific as SAPbouiCOM.Matrix;
                // Make the matrix fill the area
                _mat_CST.AutoResizeColumns();

                //initialize the data table first
                _dt_CST = _oForm.DataSources.DataTables.Item("dt_SelectCusfromORDR");
                _dt_LST = _oForm.DataSources.DataTables.Item("dtListLines");

                _grid_CST = _oForm.Items.Item("grid_CST").Specific as SAPbouiCOM.Grid;

                _btnPost.PressedAfter         += _btnPost_PressedAfter;
                _btnBack.PressedAfter         += _btnBack_PressedAfter;
                _btnNext.PressedAfter         += _btnNext_PressedAfter;
                _btnView.PressedBefore        += _btnView_PressedBefore;
                _txtCSTCD.ChooseFromListAfter += _txtCSTCD_ChooseFromListAfter;
                _txtSrchPO.KeyDownAfter       += _txtSrchPO_KeyDownAfter;
                _grid_CST.ValidateAfter       += _grid_CST_ValidateAfter;
                _grid_CST.PressedAfter        += _grid_CST_PressedAfter;
                _mat_CST.LinkPressedBefore    += _mat_CST_LinkPressedBefore;
                // Double click events
                _grid_CST.DoubleClickAfter += _grid_CST_DoubleClickAfter;
                _mat_CST.DoubleClickAfter  += _mat_CST_DoubleClickAfter;
            }
            catch (Exception Ex) { eCommon.SBO_Application.MessageBox(Ex.Message); }
        }
Ejemplo n.º 19
0
        public void GetItemReferences()
        {
            try
            {
                _txtVendor = _oForm.Items.Item("txtVendor").Specific as SAPbouiCOM.EditText;
                _txtDTFRM  = _oForm.Items.Item("txtDTFRM").Specific as SAPbouiCOM.EditText;
                _txtDTTO   = _oForm.Items.Item("txtDTTO").Specific as SAPbouiCOM.EditText;
                _btnView   = _oForm.Items.Item("btnView").Specific as SAPbouiCOM.Button;
                _txtSrchPO = _oForm.Items.Item("txtSrchPO").Specific as SAPbouiCOM.EditText;
                _txtTTLAMT = _oForm.Items.Item("txtTtlAmt").Specific as SAPbouiCOM.EditText;
                _txtTTLQTY = _oForm.Items.Item("txtTtlQty").Specific as SAPbouiCOM.EditText;

                _txtNAME  = _oForm.Items.Item("txtNAME").Specific as SAPbouiCOM.EditText;
                _txtPSTDT = _oForm.Items.Item("txtPSTDT").Specific as SAPbouiCOM.EditText;
                _txtDUEDT = _oForm.Items.Item("txtDUEDT").Specific as SAPbouiCOM.EditText;
                _txtDOCDT = _oForm.Items.Item("txtDOCDT").Specific as SAPbouiCOM.EditText;
                _txtRMK   = _oForm.Items.Item("txtRMK").Specific as SAPbouiCOM.EditText;

                _btnPost = _oForm.Items.Item("btnPost").Specific as SAPbouiCOM.Button;
                _btnNext = _oForm.Items.Item("btnNext").Specific as SAPbouiCOM.Button;
                _btnBack = _oForm.Items.Item("btnBack").Specific as SAPbouiCOM.Button;
                _cbDraft = _oForm.Items.Item("cbDraft").Specific as SAPbouiCOM.CheckBox;

                _mat_Vendor = _oForm.Items.Item("mat_Vendor").Specific as SAPbouiCOM.Matrix;

                _mat_Vendor.AutoResizeColumns();
                _dt_VendorMatrix = _oForm.DataSources.DataTables.Item("dt_VendorfromOPOR");

                _grid_Vendor   = _oForm.Items.Item("grid_Ven").Specific as SAPbouiCOM.Grid;
                _dt_VendorGrid = _oForm.DataSources.DataTables.Item("dtListLines");

                _mat_Vendor.LinkPressedBefore  += _mat_Vendor_LinkPressedBefore;
                _txtSrchPO.KeyDownAfter        += _txtSrchPO_KeyDownAfter;
                _txtVendor.ChooseFromListAfter += _txtVendor_ChooseFromListAfter;
                _btnView.PressedBefore         += _btnView_PressedBefore;
                _btnNext.PressedAfter          += _btnNext_PressedAfter;
                _btnBack.PressedAfter          += _btnBack_PressedAfter;
                _grid_Vendor.PressedAfter      += _grid_Vendor_PressedAfter;
                _grid_Vendor.ValidateAfter     += _grid_Vendor_ValidateAfter;
                _btnPost.PressedAfter          += _btnPost_PressedAfter;
                // Double click events
                _grid_Vendor.DoubleClickAfter += _grid_Vendor_DoubleClickAfter;
                _mat_Vendor.DoubleClickAfter  += _mat_Vendor_DoubleClickAfter;
            }
            catch (Exception Ex) { eCommon.SBO_Application.MessageBox(Ex.Message); }
        }
Ejemplo n.º 20
0
        private void LoadRoutesMatrix()
        {
            pObjMtxRoutes.Columns.Item("cName").DataBind.Bind("DsRoutes", "Name");
            pObjMtxRoutes.Columns.Item("cOrign").DataBind.Bind("DsRoutes", "U_Origen");
            pObjMtxRoutes.Columns.Item("cMOrgn").DataBind.Bind("DsRoutes", "U_TR_TOWNORIG");
            pObjMtxRoutes.Columns.Item("cDest").DataBind.Bind("DsRoutes", "U_Destino");
            pObjMtxRoutes.Columns.Item("cMDest").DataBind.Bind("DsRoutes", "U_TR_TOWNDES");
            pObjMtxRoutes.Columns.Item("cKmA").DataBind.Bind("DsRoutes", "U_TypeA");
            pObjMtxRoutes.Columns.Item("cKmB").DataBind.Bind("DsRoutes", "U_TypeB");
            pObjMtxRoutes.Columns.Item("cKmC").DataBind.Bind("DsRoutes", "U_TypeC");
            pObjMtxRoutes.Columns.Item("cKmD").DataBind.Bind("DsRoutes", "U_TypeD");
            pObjMtxRoutes.Columns.Item("cKmE").DataBind.Bind("DsRoutes", "U_TypeE");
            pObjMtxRoutes.Columns.Item("cKmF").DataBind.Bind("DsRoutes", "U_TypeF");

            lObjDtRoutes = lObjModalForm.DataSources.DataTables.Item("DsRoutes");

            pObjMtxRoutes.AutoResizeColumns();
            pObjMtxRoutes.LoadFromDataSource();
        }
    private void ShowExportItem(SAPbouiCOM.Form form)
    {
        string sql = "";

        try
        {
            if (form.Items.Item(MtxItem) == null)
            {
                return;
            }

            form.Items.Item(MtxItem).AffectsFormMode = false;
            oMatrixItemExport = (SAPbouiCOM.Matrix)form.Items.Item(MtxItem).Specific;
            oMatrixItemExport.Clear();
            oDTItemExport = getDataTableItemMaster(form);
            sql           = String.Format("select 'N' as [clSel],ROW_NUMBER() OVER (ORDER BY [DocEntry]) AS [ID],[ItemCode],[ItemName],IFNULL([U_EbizChargeID],'') as [EBiz],CASE WHEN IFNULL([U_EbizChargeID], '') = '' THEN 'False' ELSE 'True'END as [Sync] from OITM ").Replace("]", "\"").Replace("[", "\"");

            oDTItemExport.ExecuteQuery(sql);

            BindMatrixItem(oMatrixItemExport, "clSel", "clSel", dtItem, true);
            BindMatrixItem(oMatrixItemExport, "clNo", "ID");
            BindMatrixItem(oMatrixItemExport, "ItemCode", "ItemCode");
            BindMatrixItem(oMatrixItemExport, "ItemName", "ItemName");

            // BindMatrixItem(oMatrixItemExport, "clEbizkey", "EBiz");
            BindMatrixItem(oMatrixItemExport, "clSync", "Sync");

            oMatrixItemExport.LoadFromDataSource();
            oMatrixItemExport.AutoResizeColumns();
        }
        catch (Exception ex)
        {
            errorLog(ex);
            errorLog(sql);
        }
    }
Ejemplo n.º 22
0
        public void iniciarValoresPorDefecto()
        {
            try
            {
                //Conexion.application.Menus.Item(Constantes.Menu_Crear).Enabled = false;
                //Conexion.application.Menus.Item(Constantes.Menu_Buscar).Enabled = false;

                dsEquipo.Clear();

                var mListEquipos = EquipoDAO.listar();

                foreach (var item in mListEquipos)
                {
                    dsEquipo.InsertRecord(dsEquipo.Size);
                    insertToDS(dsEquipo.Size - 1, item.docEntry.ToString(), item.codigo, item.descripcion,
                               item.modelo, item.serie, item.color, item.codigoUnico, item.verificarId);
                }

                dsEquipo.InsertRecord(dsEquipo.Size);
                insertToDS(dsEquipo.Size - 1, string.Empty);

                mtxPrincipal.LoadFromDataSource();

                for (int i = 0; i < dsEquipo.Size - 1; i++)
                {
                    mtxPrincipal.CommonSetting.SetCellEditable(i + 1, 1, false);
                }

                mtxPrincipal.AutoResizeColumns();
                mtxPrincipal.SetCellFocus(mtxPrincipal.RowCount, 1);
            }
            catch (Exception ex)
            {
                StatusMessageError("iniciarValoresPorDefecto() > " + ex.Message);
            }
        }
Ejemplo n.º 23
0
    private void ShowExportBp(SAPbouiCOM.Form form, String DefaultCheck = "N")
    {
        string sql = "";

        try
        {
            if (form.Items.Item(MtxBPExport) == null)
            {
                return;
            }

            form.Items.Item(MtxBPExport).AffectsFormMode = false;
            oMatrixBpExport = (SAPbouiCOM.Matrix)form.Items.Item(MtxBPExport).Specific;
            oMatrixBpExport.Clear();
            oDTBpExport = getDataTableBP(form);
            sql         = String.Format("SELECT '{0}' as [sel],ROW_NUMBER() OVER (ORDER BY T0.[CardCode]) AS [ID],T0.[CardCode] as [c], T0.[CardName],T0.[Balance],T0.[E_Mail], IFNULL(T0.[U_EbizChargeID],'') as [EBiz],CASE WHEN IFNULL(T0.[U_EbizChargeID], '') = '' THEN 'False' ELSE 'True'END as [Sync] FROM OCRD T0 WHERE T0.[CardType] = 'C'", DefaultCheck).Replace("]", "\"").Replace("[", "\"");

            oDTBpExport.ExecuteQuery(sql);
            BindMatrixBP(oMatrixBpExport, "clSel", "sel", dtBPExport, true);
            BindMatrixBP(oMatrixBpExport, "clNo", "ID");
            BindMatrixBP(oMatrixBpExport, "colCard", "c");
            BindMatrixBP(oMatrixBpExport, "CardName", "CardName");
            BindMatrixBP(oMatrixBpExport, "Balance", "Balance");
            BindMatrixBP(oMatrixBpExport, "E_Mail", "E_Mail");
            // BindMatrixBP(oMatrixBpExport, "clEbizkey", "EBiz");
            BindMatrixBP(oMatrixBpExport, "clSync", "Sync");

            oMatrixBpExport.LoadFromDataSource();
            oMatrixBpExport.AutoResizeColumns();
        }
        catch (Exception ex)
        {
            errorLog(ex);
            errorLog(sql);
        }
    }
    private void ShowSendPendEmail(SAPbouiCOM.Form form)
    {
        string sql = "";

        try
        {
            if (form.Items.Item(MtxSendPendingEmail) == null)
            {
                return;
            }

            DateTime FromdtValue         = getdate(ed_fromDate);
            DateTime TodtValue           = getdate(ed_ToDate).Add(DateTime.MaxValue.TimeOfDay);
            var      PendingPaymentsList = ebiz.SearchEbizWebFormPendingPayments(getToken(), "", FromdtValue, TodtValue, null, 0, 100, "");

            //  var PaymentResp = ebiz.DeleteEbizWebFormPayment(getToken(), "");
            // var ReminderResp = ebiz.ResendEbizWebFormEmail(getToken(), "");


            form.Items.Item(MtxSendPendingEmail).AffectsFormMode = false;
            oMatrixPendEmail = (SAPbouiCOM.Matrix)form.Items.Item(MtxSendPendingEmail).Specific;
            oMatrixPendEmail.Clear();
            odtSendPendingEmail = getDataTablePendEmail(form);

            sql = String.Format("select  top 1'N' as [clSel],ROW_NUMBER() OVER (ORDER BY [DocEntry]) AS [ID],[DocNum],[DocDate],[DocTotal],[CardCode],[CardName],IFNULL([U_EbizChargeID],'') as [EBiz],CASE WHEN IFNULL([U_EbizChargeID], '') = '' THEN 'False' ELSE 'True'END as [Sync] from ORDR where  [DocStatus]='100' ").Replace("]", "\"").Replace("[", "\"");
            odtSendPendingEmail.ExecuteQuery(sql);
            BindMatrixPendEmail(oMatrixPendEmail, "clSel", "clSel", dtItem, true);
            BindMatrixPendEmail(oMatrixPendEmail, "clNo", "ID");
            BindMatrixPendEmail(oMatrixPendEmail, "DocNum", "DocNum");
            BindMatrixPendEmail(oMatrixPendEmail, "DocDate", "DocDate");
            BindMatrixPendEmail(oMatrixPendEmail, "CardCode", "CardCode");
            BindMatrixPendEmail(oMatrixPendEmail, "Email", "CardName");
            BindMatrixPendEmail(oMatrixPendEmail, "DocTotal", "DocTotal");
            BindMatrixPendEmail(oMatrixPendEmail, "clEbizkey", "EBiz");
            BindMatrixPendEmail(oMatrixPendEmail, "clSync", "Sync");

            oMatrixPendEmail.LoadFromDataSource();
            oMatrixPendEmail.Clear();
            foreach (var itm in PendingPaymentsList)
            {
                oMatrixPendEmail.AddRow(1);
                SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("CardCode").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                oEdit.Value = itm.CustomerId;
                oEdit       = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("DocTotal").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                oEdit.Value = itm.AmountDue;
                oEdit       = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("DocNum").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                oEdit.Value = itm.InvoiceNumber;
                oEdit       = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("clEbizkey").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                oEdit.Value = itm.PaymentInternalId;
                oEdit       = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("Email").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                oEdit.Value = itm.CustomerEmailAddress;
                oEdit       = (SAPbouiCOM.EditText)oMatrixPendEmail.Columns.Item("DocDate").Cells.Item(oMatrixPendEmail.RowCount).Specific;
                var date = DatetimeTosapFormatDate(Convert.ToDateTime(itm.PaymentRequestDateTime));
                oEdit.Value = date;
            }
            oMatrixPendEmail.AutoResizeColumns();
        }
        catch (Exception ex)
        {
            errorLog(ex);
            errorLog(sql);
        }
    }
    private void ShowRecPay(SAPbouiCOM.Form form)
    {
        string sql = "";

        try
        {
            if (form.Items.Item(MtxRecPay) == null)
            {
                return;
            }

            DateTime FromdtValue = getdate(ed_fromDatePyR);
            DateTime TodtValue   = getdate(ed_ToDatePyR).Add(DateTime.MaxValue.TimeOfDay);
            var      filters     = new SearchFilter[1];
            filters[0] = new SearchFilter();

            filters[0].FieldName          = "PaymentInternalId";
            filters[0].ComparisonOperator = "eq";
            filters[0].FieldValue         = "7331bcf0-4ea4-4259-a14f-3343233d295a";

            var PendingPaymentsList = ebiz.SearchEbizWebFormReceivedPayments(getToken(), "", FromdtValue, TodtValue, null, 0, 100, "");



            form.Items.Item(MtxRecPay).AffectsFormMode = false;
            OMtxRecPay = (SAPbouiCOM.Matrix)form.Items.Item(MtxRecPay).Specific;
            OMtxRecPay.Clear();
            odtRecPay = GetDatatableRecPay(form);

            sql = String.Format("select  top 1'N' as [clSel],ROW_NUMBER() OVER (ORDER BY [DocEntry]) AS [ID],[DocNum],[DocDate],[DocTotal],[CardCode],[CardName],IFNULL([U_EbizChargeID],'') as [EBiz],CASE WHEN IFNULL([U_EbizChargeID], '') = '' THEN 'False' ELSE 'True'END as [Sync] from ORDR where  [DocStatus]='100' ").Replace("]", "\"").Replace("[", "\"");
            odtRecPay.ExecuteQuery(sql);
            BindMtxRecPay(OMtxRecPay, "clSel", "clSel", dtItem, true);
            BindMtxRecPay(OMtxRecPay, "clNo", "ID");
            BindMtxRecPay(OMtxRecPay, "DocNum", "DocNum");
            BindMtxRecPay(OMtxRecPay, "DocDate", "DocDate");
            BindMtxRecPay(OMtxRecPay, "CardCode", "CardCode");
            BindMtxRecPay(OMtxRecPay, "Email", "CardName");
            BindMtxRecPay(OMtxRecPay, "DocTotal", "DocTotal");
            BindMtxRecPay(OMtxRecPay, "clEbizkey", "EBiz");
            BindMtxRecPay(OMtxRecPay, "clSync", "Sync");

            OMtxRecPay.LoadFromDataSource();
            OMtxRecPay.Clear();
            foreach (var itm in PendingPaymentsList)
            {
                OMtxRecPay.AddRow(1);
                SAPbouiCOM.EditText oEdit = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("CardCode").Cells.Item(OMtxRecPay.RowCount).Specific;
                oEdit.Value = itm.CustomerId;
                oEdit       = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("DocTotal").Cells.Item(OMtxRecPay.RowCount).Specific;
                oEdit.Value = itm.AmountDue;
                oEdit       = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("DocNum").Cells.Item(OMtxRecPay.RowCount).Specific;
                oEdit.Value = itm.InvoiceNumber;
                oEdit       = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("clEbizkey").Cells.Item(OMtxRecPay.RowCount).Specific;
                oEdit.Value = itm.PaymentInternalId;
                oEdit       = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("Email").Cells.Item(OMtxRecPay.RowCount).Specific;
                oEdit.Value = itm.CustomerEmailAddress;
                oEdit       = (SAPbouiCOM.EditText)OMtxRecPay.Columns.Item("DocDate").Cells.Item(OMtxRecPay.RowCount).Specific;
                var date = DatetimeTosapFormatDate(Convert.ToDateTime(itm.PaymentRequestDateTime));
                oEdit.Value = date;
            }
            OMtxRecPay.AutoResizeColumns();
        }
        catch (Exception ex)
        {
            errorLog(ex);
            errorLog(sql);
        }
    }