コード例 #1
0
        private void LoadFormReceipt()
        {
            try
            {
                if (mIntRowSelected > 0 && mtxCosts.IsRowSelected(mIntRowSelected))
                {
                    string pStrRowCode = DtMatrix.GetValue("C_Folio", mIntRowSelected - 1).ToString();

                    //List<Vouchers> lObjVouchers = mObjPurchasesDAO.GetVouches(pStrRowCode);
                    //if (lObjVouchers.Count() > 0)
                    //{
                    //    frmReceipts lObjfrmReceipts = new frmReceipts(pStrRowCode);
                    //    lObjfrmReceipts.Show();
                    //}
                    //else
                    //{
                    string lStrArea     = DtMatrix.GetValue("C_Area", mIntRowSelected - 1).ToString();
                    string lStrEmployee = DtMatrix.GetValue("C_Employe", mIntRowSelected - 1).ToString();
                    string lStrFolio    = DtMatrix.GetValue("C_Folio", mIntRowSelected - 1).ToString();
                    string lStrEmpId    = DtMatrix.GetValue("C_EmpId", mIntRowSelected - 1).ToString();
                    string lStrStatus   = DtMatrix.GetValue("C_Status", mIntRowSelected - 1).ToString();

                    string lStrCode = mObjPurchasesServiceFactory.GetPurchaseCheeckingCostService().CheckingCost(lStrFolio);

                    if (string.IsNullOrEmpty(lStrStatus) && !string.IsNullOrEmpty(lStrCode))
                    {
                        UIApplication.ShowMessageBox("Ya existe un comprobante registrado");
                    }
                    else if (!string.IsNullOrEmpty(lStrCode))
                    {
                        frmReceipts lObjfrmReceipts = new frmReceipts(lStrCode, TypeEnum.Type.Voucher);
                        lObjfrmReceipts.UIAPIRawForm.Left = 500;
                        lObjfrmReceipts.UIAPIRawForm.Top  = 10;
                        lObjfrmReceipts.Show();
                    }
                    else
                    {
                        frmReceipts lObjfrmReceipts = new frmReceipts(lStrArea, lStrEmployee, lStrEmpId, lStrFolio, TypeEnum.Type.Voucher);
                        lObjfrmReceipts.UIAPIRawForm.Left = 500;
                        lObjfrmReceipts.UIAPIRawForm.Top  = 10;
                        lObjfrmReceipts.Show();
                    }
                    //}
                }
                else
                {
                    UIApplication.ShowMessageBox("Favor de seleccionar una linea");
                }
            }
            catch (Exception ex)
            {
                LogService.WriteError("(btnEdit_ClickBefore): " + ex.Message);
                LogService.WriteError(ex);
            }
        }
コード例 #2
0
        private int mtSelRow(SAPbouiCOM.Matrix mt)
        {
            int selectedrow = 0;

            for (int i = 1; i <= mt.RowCount; i++)
            {
                if (mt.IsRowSelected(i))
                {
                    selectedrow = i;
                    return(i);
                }
            }
            return(selectedrow);
        }
コード例 #3
0
        }//fin MenuEvent

        private void Borrar()
        {
            Int32   i;
            Boolean Paso = false;
            String  DocEntry;

            SAPbouiCOM.EditText oEditText;
            TFunctions          Reg;

            try
            {
                oForm.Freeze(true);
                Reg       = new TFunctions();
                Reg.SBO_f = FSBOf;
                i         = 1;
                while (i <= oMtx.RowCount)
                {
                    if (oMtx.IsRowSelected(i))
                    {
                        oEditText = (EditText)(oMtx.Columns.Item("DocEntry").Cells.Item(i).Specific);
                        DocEntry  = (System.String)(oEditText.Value).Trim();
                        if (DocEntry != "")
                        {
                            Reg.DelDataSource("D", "VID_FEPROCED", "", FSBOf.StrToInteger(DocEntry));
                            oMtx.DeleteRow(i);
                            Paso = true;
                            i    = oMtx.RowCount;
                        }
                    }
                    i++;
                }
                if (!Paso)
                {
                    FSBOApp.StatusBar.SetText("Debe seleccionar una linea", BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning);
                }
                else
                {
                    oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception x)
            {
                oForm.Freeze(false);
            }
        }
コード例 #4
0
ファイル: KIS_SO0030A_HRD.cs プロジェクト: wldyd0210/TEST
 private void LastSelectedMatrixRow_Select(SAPbouiCOM.Form oForm)
 {
     oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
     if (gDeliverySelect > 0)
     {
         if (oMatrix.VisualRowCount >= gDeliverySelect)
         {
             if (!oMatrix.IsRowSelected(gDeliverySelect))
                 oMatrix.SelectRow(gDeliverySelect, true, false);
         }
     }
 }
コード例 #5
0
ファイル: KIS_SO0060A_HRD.cs プロジェクト: wldyd0210/TEST
        public virtual bool ET_mtx_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx").Specific));
            // ADD YOUR ACTION CODE HERE ...

            try
            {
                if (pVal.Row > 0)
                {
                    if (oMatrix.VisualRowCount >= pVal.Row)
                    {
                        if (oMatrix.IsRowSelected(pVal.Row) != true)
                        {
                            oMatrix.SelectRow(pVal.Row, true, false);
                        }
                    }
                }
            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            return true;
        }