public static string GetItemCode(this BusinessObjectInfo businessObjectInfo)
        {
            var xmlDoc = new XmlDocument();

            xmlDoc.LoadXml(businessObjectInfo.ObjectKey);
            return(xmlDoc.SelectSingleNode("//ItemCode").InnerText);
        }
예제 #2
0
파일: frm_150.cs 프로젝트: ubaidmughal/SAP
        public override void etFormAfterDataLoad(ref BusinessObjectInfo BusinessObjectInfo, ref bool BubbleEvent)
        {
            base.etFormAfterDataLoad(ref BusinessObjectInfo, ref BubbleEvent);

            fillCmb();
            oForm.Mode = BoFormMode.fm_OK_MODE;
        }
예제 #3
0
        public static bool Matches(this BusinessObjectInfo dataEvent, bool?actionSuccess = null, bool?beforeAction = null,
                                   Enum eventType = null, List <Enum> eventTypes = null, string formTypeEx = null, string formUid = null, string type = null)
        {
            if (actionSuccess.HasValue && !dataEvent.ActionSuccess.Equals(actionSuccess.Value))
            {
                return(false);
            }
            if (beforeAction.HasValue && !dataEvent.BeforeAction.Equals(beforeAction.Value))
            {
                return(false);
            }
            if (eventType != null && !dataEvent.EventType.ToString().Equals(eventType.ToString()))
            {
                return(false);
            }
            if (eventTypes != null && !eventTypes.Any(et => dataEvent.EventType.ToString().Equals(et.ToString())))
            {
                return(false);
            }
            if (formTypeEx != null && !dataEvent.FormTypeEx.Equals(formTypeEx))
            {
                return(false);
            }
            if (formUid != null && !dataEvent.FormUID.Equals(formUid))
            {
                return(false);
            }
            if (type != null && !dataEvent.Type.Equals(type))
            {
                return(false);
            }

            return(true);
        }
예제 #4
0
        /// <summary>
        /// Get DocEntry from BusinessObjectInfo
        /// </summary>
        /// <param name="businessObjectInfo"></param>
        /// <returns>DocEntry</returns>
        public static int GetDocEntry(this BusinessObjectInfo businessObjectInfo)
        {
            var xmlDoc = new XmlDocument();

            xmlDoc.LoadXml(businessObjectInfo.ObjectKey);
            return(int.Parse(xmlDoc.SelectSingleNode("/DocumentParams/DocEntry").InnerText));
        }
예제 #5
0
        private void OnFormDataEvent(ref BusinessObjectInfo e, out bool bubbleEvent)
        {
            bubbleEvent = true;

            try
            {
                var formUid = e.FormUID;
                if (listeners.ContainsKey(formUid))
                {
                    listeners[formUid].OnFormDataEvent(ref e, out bubbleEvent);
                    return;
                }

                var formType = e.FormTypeEx;
                if (listeners.ContainsKey(formType))
                {
                    listeners[formType].OnFormDataEvent(ref e, out bubbleEvent);
                    return;
                }

                var eventType = e.EventType.ToString();
                if (listeners.ContainsKey(eventType))
                {
                    listeners[eventType].OnFormDataEvent(ref e, out bubbleEvent);
                }
            }
            catch (Exception exception)
            {
                EventHandlerError(null, new ErrorEventArgs(exception));
            }
        }
예제 #6
0
파일: FormBase.cs 프로젝트: wgasparin/dover
 protected internal virtual void OnFormDataLoadAfter(ref BusinessObjectInfo pVal)
 {
     if (this.DataLoadAfter != null)
     {
         this.DataLoadAfter(ref pVal);
     }
 }
예제 #7
0
        private void Form_DataLoadAfter(ref BusinessObjectInfo pVal)
        {
            var grid = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_LCN1");

            grid.InsertRecord(grid.Size);

            mtItens.LoadFromDataSourceEx();
        }
예제 #8
0
 private void FormDataLoadFilterAfter(ref BusinessObjectInfo pVal, ref bool bubbleevent)
 {
     if (this.formUid.Contains(pVal.FormTypeEx))
     {
         oForm = B1AppDomain.Application.Forms.ActiveForm;
         FormDataLoad_After(ref pVal, ref bubbleevent);
     }
 }
예제 #9
0
파일: FormBase.cs 프로젝트: wgasparin/dover
 protected internal virtual void OnFormDataLoadBefore(ref BusinessObjectInfo pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     if (this.DataLoadBefore != null)
     {
         this.DataLoadBefore(ref pVal, out BubbleEvent);
     }
 }
예제 #10
0
 public void SBO_Application_FormDataEvent(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
 {
     bBubbleEvent = true;
     if (businessObjectInfo.FormTypeEx == pluginForm.FormType)
     {
         frmFumigado.FormDataEventHandler(ref businessObjectInfo, sbo_company, ref sbo_application, out bBubbleEvent, sessionId);
     }
 }
예제 #11
0
        protected virtual void OnFormDataLoadAfter(ref BusinessObjectInfo pVal)
        {
            DoverFormBase addOneForm;

            if (events.TryGetValue(pVal.FormUID, out addOneForm))
            {
                addOneForm.OnFormDataLoadAfter(ref pVal);
            }
        }
        public static void FormDataEvent(ref BusinessObjectInfo BusinessObjectInfo, out Boolean BubbleEvent)
        {
            BubbleEvent = true;
            // The event provides the unique ID (BusinessObjectInfo.ObjectKey) of the modified business object.
            _sFormDataEventObjectKey = BusinessObjectInfo.ObjectKey;

            // Executa o método FormDataEvent do formulário em que ocorreu o evento
            BubbleEvent = ExecuteEvent <BusinessObjectInfo>(BusinessObjectInfo.FormTypeEx, BusinessObjectInfo, "FormDataEvent", true);
        }
예제 #13
0
        protected virtual void OnFormDataLoadBefore(ref BusinessObjectInfo pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            DoverFormBase addOneForm;

            if (events.TryGetValue(pVal.FormUID, out addOneForm))
            {
                addOneForm.OnFormDataLoadBefore(ref pVal, out BubbleEvent);
            }
        }
예제 #14
0
 internal static void FormDataEventHandler(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
 {
     bBubbleEvent = true;
     switch (businessObjectInfo.EventType)
     {
     case BoEventTypes.et_FORM_DATA_ADD:
         FormDataAdd(ref businessObjectInfo, sbo_company, ref sbo_application, out bBubbleEvent, sessionId);
         break;
     }
 }
예제 #15
0
파일: frm.cs 프로젝트: cirtapae2016/frt2020
        internal static void FormDataEventHandler(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
        {
            bBubbleEvent = true;

            switch (businessObjectInfo.EventType)
            {
            default:
                break;
            }
        }
예제 #16
0
 internal void sapApp_FormDataEvent(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
 {
     BubbleEvent = true;
     foreach(var e in formDataEvents)
     {
         ((_IApplicationEvents_FormDataEventEventHandler)e)(ref BusinessObjectInfo, out BubbleEvent);
         if (!BubbleEvent)
             break;
     }
 }
예제 #17
0
 public void SBO_Application_FormDataEvent(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
 {
     bBubbleEvent = true;
     switch (businessObjectInfo.FormTypeEx)
     {
     case pluginForm.FormType:
         frm.FormDataEventHandler(ref businessObjectInfo, sbo_company, ref sbo_application, out bBubbleEvent, sessionId);
         break;
     }
 }
예제 #18
0
        public override void etFormAfterDataLoad(ref BusinessObjectInfo BusinessObjectInfo, ref bool BubbleEvent)
        {
            base.etFormAfterDataLoad(ref BusinessObjectInfo, ref BubbleEvent);
            string subGrpCode = Convert.ToString(dbOITM.GetValue("U_SubGrp", 0));

            string subGrpCode2 = Convert.ToString(dbOITM.GetValue("U_SubGrp2", 0));

            fillCmb();
            //      fillCmb2(subGrpCode2);
            oForm.Mode = BoFormMode.fm_OK_MODE;
        }
예제 #19
0
 internal void sapApp_FormDataEvent(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
 {
     BubbleEvent = true;
     foreach (var e in formDataEvents)
     {
         ((_IApplicationEvents_FormDataEventEventHandler)e)(ref BusinessObjectInfo, out BubbleEvent);
         if (!BubbleEvent)
         {
             break;
         }
     }
 }
예제 #20
0
        public override void OnAfterFormDataLoad(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;


            base.OnAfterFormDataLoad(ref BusinessObjectInfo, out BubbleEvent);

            using (var formCOM = new FormCOM(BusinessObjectInfo.FormUID))
            {
                var form = formCOM.Form;
                AtualizarMatriz(form);
            }
        }
예제 #21
0
        private void Form_DataUpdateBefore(ref BusinessObjectInfo pVal, out bool BubbleEvent)
        {
            BubbleEvent = true;
            var grid = UIAPIRawForm.DataSources.DBDataSources.Item("@HTT_LCN1");

            for (int i = 0; i < grid.Size; i++)
            {
                if (double.Parse(grid.GetValue("U_ItemVlr", i)) == 0.0)
                {
                    grid.RemoveRecord(i);
                }
            }
        }
        }//fin FormEvent

        public new void FormDataEvent(ref BusinessObjectInfo BusinessObjectInfo, ref Boolean BubbleEvent)
        {
            base.FormDataEvent(ref BusinessObjectInfo, ref BubbleEvent);

            try
            {
            }
            catch (Exception e)
            {
                FSBOApp.StatusBar.SetText("FormDataEvent: " + e.Message + " ** Trace: " + e.StackTrace, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                OutLog("FormDataEvent: " + e.Message + " ** Trace: " + e.StackTrace);
            }
        }//fin FormDataEvent
예제 #23
0
        public override void OnBeforeFormDataUpdate(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;

            using (var formCOM = new FormCOM(BusinessObjectInfo.FormUID))
            {
                var form = formCOM.Form;
                using (var dbdtsCOM = new DBDatasourceCOM(form, mainDbDataSource))
                {
                    var dbdts = dbdtsCOM.Dbdts;

                    BubbleEvent = CamposFormEstaoPreenchidos(form, dbdts);
                }
            }
        }
예제 #24
0
        private static void FormDataAdd(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
        {
            bBubbleEvent = true;
            if (businessObjectInfo.BeforeAction)
            {
            }

            if (!businessObjectInfo.BeforeAction)
            {
                if (businessObjectInfo.ActionSuccess)
                {
                    var oForm    = sbo_application.Forms.Item(businessObjectInfo.FormUID);
                    var DocEntry = oForm.DataSources.DBDataSources.Item(pluginForm.dbCabecera).GetValue("DocEntry", 0);
                    var Transf   = CommonFunctions.GET(ServiceLayer.StockTransfers, DocEntry, null, sessionId, out System.Net.HttpStatusCode statusCode).DeserializeJsonObject <StockTransfer>();

                    if (!string.IsNullOrEmpty(Transf.U_DTE_FolioRef))
                    {
                        var Of = CommonFunctions.GET(ServiceLayer.ProductionOrders, null, $"?$filter=DocumentNumber eq {Transf.U_DTE_FolioRef}", sessionId, out statusCode).DeserializeJsonObject <ProductionOrder>();

                        foreach (var line in Transf.StockTransferLines)
                        {
                            foreach (var lot in line.BatchNumbers)
                            {
                                var ofLine = Of.ProductionOrderLines.Where(i => i.ItemNo == line.ItemCode).Single();

                                ofLine.BatchNumbers.Add(new BatchNumbers
                                {
                                    BatchNumber    = lot.BatchNumber,
                                    Quantity       = lot.Quantity,
                                    BaseLineNumber = (int)ofLine.LineNumber
                                });
                            }
                        }

                        var response = CommonFunctions.PATCH(ServiceLayer.ProductionOrders, Of, Of.AbsoluteEntry.ToString(), sessionId, out statusCode);
                        if (statusCode != System.Net.HttpStatusCode.NoContent)
                        {
                            var _Error = response.DeserializeJsonToDynamic();
                            throw new Exception($"Error en el registro : {_Error.error.message.value.ToString()}");
                        }
                        else
                        {
                            sbo_application.MessageBox($"Lotes asignados correctamente a la OF {Of.DocumentNumber}");
                        }
                    }
                }
            }
        }
예제 #25
0
        public void OnFormDataEvent(ref BusinessObjectInfo e, out bool bubbleEvent)
        {
            bubbleEvent = true;

            var key = new FormDataEventHandlerAttribute(e.EventType, e.BeforeAction);

            if (e.BeforeAction && before.ContainsKey(key))
            {
                bubbleEvent = before[key].Invoke(e);
                return;
            }

            if (!e.BeforeAction && after.ContainsKey(key))
            {
                after[key].Invoke(e);
            }
        }
예제 #26
0
        /// <summary>
        ///Se producen cuando la aplicación realiza las acciones siguientes en formularios conectados a objetos de negocio:
        ///- Añadir
        ///- Actualizar
        ///- Borrar
        /// </summary>
        /// <param name="BusinessObjectInfo">
        /// Información del objeto aplicado
        /// </param>
        /// <param name="BubbleEvent">
        /// true/false
        /// </param>
        private void SBO_Application_FormEvent(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;
            try
            {
                if (BusinessObjectInfo.BeforeAction == true && BusinessObjectInfo.FormTypeEx == FRM_ENTRADA_DE_MERCANCIA.ToString())
                {
                    if (BusinessObjectInfo.EventType == SAPbouiCOM.BoEventTypes.et_FORM_DATA_ADD &&
                        BusinessObjectInfo.Type == OBJETO_ENTRADA_MERCANCIA && BusinessObjectInfo.ActionSuccess == false)
                    {
                        lDatos.Clear();
                        SAPbouiCOM.Form _oNuevaForm = _Application.Forms.GetForm(BusinessObjectInfo.FormTypeEx, _Application.Forms.ActiveForm.TypeCount);
                        if (BusinessObjectInfo.FormTypeEx == FRM_ENTRADA_DE_MERCANCIA.ToString())
                        {
                            _oMatrixArticulos = _oNuevaForm.Items.Item(GRID_ARTICULOS).Specific;

                            for (int noLinea = 1; noLinea < _oMatrixArticulos.RowCount; noLinea++)
                            {
                                oItemCode = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_CLAVE_ARTICULO).Cells.Item(noLinea).Specific;
                                if (oItemCode.Value.Substring(0, 2).ToString() == "PL")
                                {
                                    oSerieInicio = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_SERIE_INICIO).Cells.Item(noLinea).Specific;
                                    oSerieFin    = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_SERIE_FIN).Cells.Item(noLinea).Specific;
                                    if (!string.IsNullOrEmpty(oSerieInicio.Value.ToString()) && !string.IsNullOrEmpty(oSerieFin.Value.ToString()))
                                    {
                                        itemDatos            = new Datos();
                                        itemDatos.itemCode   = oItemCode.Value.ToString();
                                        itemDatos.serieInial = oSerieInicio.Value.ToString();
                                        itemDatos.serieFinal = oSerieFin.Value.ToString();
                                        lDatos.Add(itemDatos);
                                    }
                                }
                            }
                            if (lDatos.Count != 0)
                            {
                                Addon.Instance.Ejecutaclase("21", lDatos);
                            }
                        }
                    }
                }
            }
            catch (Exception ex)
            {
                _Application.MessageBox("Error en FormEvent *clsEntradaDeMercancia* : " + ex.Message);
            }
        }
예제 #27
0
        private static void FormDataLoad(ref BusinessObjectInfo businessObjectInfo, SAPbobsCOM.Company sbo_company, ref Application sbo_application, out bool bBubbleEvent, string sessionId)
        {
            bBubbleEvent = true;
            if (businessObjectInfo.BeforeAction)
            {
            }

            if (!businessObjectInfo.BeforeAction)
            {
                var oForm = sbo_application.Forms.Item(businessObjectInfo.FormUID);
                ((Matrix)oForm.Items.Item(pluginForm.MtxOV.Uid).Specific).AutoResizeColumns();
                if (oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                {
                    ((Button)oForm.Items.Item(pluginForm.ButtonRefresh).Specific).Item.Enabled = true;
                }
            }
        }
예제 #28
0
        public override void OnAfterFormDataAdd(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            base.OnAfterFormDataAdd(ref BusinessObjectInfo, out BubbleEvent);

            using (var formCOM = new FormCOM(BusinessObjectInfo.FormUID))
            {
                var form = formCOM.Form;
                using (var dbdtsCOM = new DBDatasourceCOM(form, MainDbDataSource))
                {
                    var dbdts = dbdtsCOM.Dbdts;
                    if (BusinessObjectInfo.ActionSuccess)
                    {
                        _adicionou = true;
                        AtualizarSaldoPreContrato(dbdts);
                    }
                }
            }
        }
예제 #29
0
 protected void OnAppFormDataEvent(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
 {
     BubbleEvent = true;
     try {
         IB1Form theForm = null;
         if (_forms.TryGetValue(BusinessObjectInfo.FormUID, out theForm))
         {
             theForm.OnFormDataEvent(ref BusinessObjectInfo, out BubbleEvent);
         }
     }
     catch (Exception ex) {
         var handled = _errorHandler.HandleException(ex);
         if (!handled)
         {
             Exit();
         }
     }
 }
        private void OnFormDataEvent(ref BusinessObjectInfo e, out bool bubbleEvent)
        {
            bubbleEvent = true;

            try
            {
                string handlerId = GetHandlerId(e);

                if (handlerId != null)
                {
                    handlers[handlerId].OnFormDataEvent(ref e, out bubbleEvent);
                }
            }
            catch (Exception exception)
            {
                OnEventHandlerError(this, new ErrorEventArgs(exception));
            }
        }
예제 #31
0
        public override void OnBeforeFormDataAdd(ref BusinessObjectInfo BusinessObjectInfo, out bool BubbleEvent)
        {
            BubbleEvent = true;

            using (var formCOM = new FormCOM(BusinessObjectInfo.FormUID))
            {
                var form = formCOM.Form;
                using (var dbdtsCOM = new DBDatasourceCOM(form, mainDbDataSource))
                {
                    var dbdts = dbdtsCOM.Dbdts;

                    string nextCode = GetNextCode(mainDbDataSource);
                    dbdts.SetValue(_codigo.ItemUID, 0, nextCode);

                    BubbleEvent = CamposFormEstaoPreenchidos(form, dbdts);
                }
            }
        }
예제 #32
0
        public virtual void ET_AFFormDataUpdate(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);

            // ADD YOUR ACTION CODE HERE ...
            FN.GetRecordsetValue("EXEC [KIS_SP_ADDON] @work_type = 'D', @object_type = 'KIS_SO0280_HRD'");
        }
예제 #33
0
 public virtual bool ET_BFFormDataUpdate(BusinessObjectInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0150T_HRD");
     oDB_M.SetValue("U_USERSG2", 0, B1Connections.diCompany.UserSignature.ToString());
     if (BeforModifyData_CheckAuthority(oForm))
         return true;
     else
         return false;
 }
예제 #34
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                string DocEntry = FN.GetItemValue(ref oForm, "edtDOCNUM");

                SetcboSTATUS();

                Veiw_Grid1_DataTable_DataLoaded(oForm, DocEntry);

            }
            catch (Exception)
            {

                throw;
            }
        }
예제 #35
0
 public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     try
     {
         
         SetET_AFFormDataLoad();
         
     }
     catch (System.Exception ex)
     {
         B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
     }
 }
예제 #36
0
        public virtual bool ET_BFFormDataUpdate(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            oForm.Freeze(true);
            try
            {
                oMatrix = oForm.Items.Item("mtx1").Specific;

                SAPbouiCOM.DBDataSource oKIS_SD00301_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SD00301_HRD");

                FN.SetDBDataSourceDeleteRow(ref oKIS_SD00301_HRD, "U_ITMGRPCD");

                oMatrix.LoadFromDataSource();

                SetMatrixRowNumbering(oMatrix, "U_LINENUM");

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oForm.Freeze(false);
            }
            return true;
        }
예제 #37
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                string DocEntry = FN.GetItemValue(ref oForm, "edtDOCNUM");
                Veiw_Grid1_DataTable(oForm, DocEntry);
                SetEnable(oForm);

            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
예제 #38
0
        public virtual bool ET_BFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0150T_HRD");
            string strDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();
            return true;
        }
예제 #39
0
 public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal) {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     if (oForm.Mode == BoFormMode.fm_OK_MODE)
     {
         oForm.Items.Item("btnTR").Enabled = false;
         oForm.Items.Item("btnCAN").Enabled = false;
     }
 }
예제 #40
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);

            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.DBDataSource oKIS_SO00401_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SO00401_HRD");

            try
            {
                oMatrix = oForm.Items.Item("mtx1").Specific;

                FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oKIS_SO00401_HRD, FN.RowSelectMode.None, "U_CENTCD");
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            finally
            {
                oKIS_SO00401_HRD = null;
            }
        }
예제 #41
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                SAPbouiCOM.DBDataSource oKIS_TR0041T_HRD = oForm.DataSources.DBDataSources.Item("@KIS_TR0041T_HRD");

                //                string DocEntry = FN.GetItemValue(ref oForm, "edtDOCNUM");
                string DocEntry = oKIS_TR0041T_HRD.GetValue("DocEntry", 0).Trim();
                //SetcboSTATUS();

                Veiw_Grid1_DataTable_DataLoaded(oForm, DocEntry);




            }
            catch (Exception)
            {

                throw;
            }
        }
예제 #42
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            SetItemEnabled(oForm);

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0320T_HRD");
            gDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();
  
        }
예제 #43
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            SetItemEnabled(oForm);

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0310T_HRD");
            gDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();

            // Data를 SystemDataTable에 담는다.
            //SetSystemDataTable(oForm);

            FindData(oForm);

            /* 테스트용
            System.Data.DataSet ds = new DataSet();
            ds.Tables.AddRange(new System.Data.DataTable[]{dt_DELIVER, dt_CALL});
            ds.WriteXml(@"C:\\test.xml");
             */
        }
예제 #44
0
 public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     SetButtonEnabled(oForm);
 }
예제 #45
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            SetRecordsetValue_StaticCaption();

        }
예제 #46
0
 protected virtual void OnFormDataUpdateAfter(ref BusinessObjectInfo pVal)
 {
     DoverFormBase addOneForm;
     if (events.TryGetValue(pVal.FormUID, out addOneForm))
     {
         addOneForm.OnFormDataUpdateAfter(ref pVal);
     }
 }
예제 #47
0
        public virtual void ET_AFFormDataAdd(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {

                this.SetMatrixAddRow( FN.RowSelectMode.None);
            }
            catch (Exception ex)
            {
                
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
예제 #48
0
        public virtual bool ET_BFFormDataAdd(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            //메모리상의 데이터 테이블의 상태값을 기준으로 DBDataSource에 복사한다. 
            if (!DataToDbDataSource_DELIVER(oForm))
                return false;
            else
                return true;
        }
예제 #49
0
        public virtual void ET_AFFormDataUpdate(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                //문서상태갱신
                SetcboSTATUS();

                //문서상태가 미결일 때만 행추가
                if (oForm.DataSources.UserDataSources.Item("cboSTATUS").Value == "SO")
                {
                    this.SetMatrixAddRow(FN.RowSelectMode.None);
                }
            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
예제 #50
0
        public virtual void ET_AFFormDataUpdate(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...


            try
            {
                oForm.Freeze(true);

                //SetSystemDataTable(oForm);
                // 1. 저장후 라인ID 값 셋팅 및 상태값 초기화
                DbDataSourceToDataTable(oForm);

                // 2. 화면 조회다시 실행
                FindData(oForm);

                //DataSet ds = new DataSet();
                //ds.Tables.AddRange(new System.Data.DataTable[] { gDs.Tables[oForm.UniqueID + "_Deliver"], gDs.Tables[oForm.UniqueID + "_Call"] });
                //ds.WriteXml(@"C:\\test.xml");
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oForm.Freeze(false);
            }
        }
예제 #51
0
        public virtual bool ET_BFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            oComboBox = oForm.Items.Item("cboDEPMD").Specific;

            if (oComboBox.ValidValues.Count != cboDepMDCnt + 1)   //if (oComboBox.ValidValues.Count != 11)
            {
                SO_COMMON_HRD.LComboBind(oForm, "cboDEPMD", FN.Enum_WholeTp.m_Space, "TYPE ='U' AND Code='SO51' AND U_USEYN = 'Y'");
            }

            return true;
        }
예제 #52
0
 public virtual bool ET_BFFormDataAdd(BusinessObjectInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     //Form에서 발생하는 데이터 추가 이벤트는 원천봉쇄.
     return false;
 }
예제 #53
0
 protected virtual void OnFormDataUpdateBefore(ref BusinessObjectInfo pVal, out bool BubbleEvent)
 {
     BubbleEvent = true;
     DoverFormBase addOneForm;
     if (events.TryGetValue(pVal.FormUID, out addOneForm))
     {
         addOneForm.OnFormDataUpdateBefore(ref pVal, out BubbleEvent);
     }
 }
예제 #54
0
 public virtual bool ET_BFFormDataUpdate(BusinessObjectInfo pVal) {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     // ADD YOUR ACTION CODE HERE ...
     return false;
 }
예제 #55
0
        public virtual bool ET_BFFormDataUpdate(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            bool rtnValue = true;

            //메모리상의 데이터 테이블의 상태값을 기준으로 DBDataSource에 복사한다. 
            try
            {
                //oForm.Freeze(true);
                oDB_M = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
                oDB_M.SetValue("U_USERSG2", 0, B1Connections.diCompany.UserSignature.ToString()); // 등록자 / 수정자 저장

                if (!DataToDbDataSource_DELIVER(oForm) || !DataToDbDataSource_CALL(oForm))
                    rtnValue = false;
                else
                    rtnValue = true;

            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                //oForm.Freeze(false);
            }

            return rtnValue;
        }
 public f2000001001(BusinessObjectInfo businessObjectInfo)
 {
     this.BusinessObjectInfo = businessObjectInfo;
 }
예제 #57
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            // Data를 SystemDataTable에 담는다.
            SetSystemDataTable(oForm);

            // 신용카드인증키 패드워드타입 변경(패스워드 타입이 항상 ***으로 표시 되기때문에 데이터 있을때만 패스워드타입으로 없을때 일반 EditText타입으로)
            SetCreditKey_ItemAttribute(oForm);

            // 청구데이터를 조회한다.
            FindRequestData(oForm);
            
            // 선수금잔액 조회
            GetAdvanceAmt(oForm);

            FindSubData(oForm, 0, "Load");


            /* 테스트용
            System.Data.DataSet ds = new DataSet();
            ds.Tables.AddRange(new System.Data.DataTable[]{gDs.Tables[oForm.UniqueID + "_Deliver"], gDs.Tables[oForm.UniqueID + "_Call"]});
            ds.WriteXml(@"C:\\test.xml");
             */
        }
예제 #58
0
        public virtual bool ET_BFFormDataDelete(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);

            // ADD YOUR ACTION CODE HERE ...
            FN.GetRecordsetValue("EXEC [KIS_SP_ADDON] @work_type = 'I', @object_type = 'KIS_SO0280_HRD'");
            return true;
        }
예제 #59
0
        public virtual bool ET_BFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                SetComboBox_Method(oForm);

                oComboBox = oForm.Items.Item("cboACCTCD").Specific;
                FN.SetComboClear(ref oComboBox);
                oDB_M.SetValue("U_ACCTCD", 0, "");
                FN.SetComboBoxValidValues(oForm, " SELECT  U_RMK1, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO19' AND U_SMLCD IN ('U201', 'U204', 'U205') ", "cboACCTCD", FN.Enum_WholeTp.m_Space, "");

            }
            catch (Exception)
            {

                throw;
            }
            return true;
        }
예제 #60
0
        public virtual void ET_AFFormDataLoad(BusinessObjectInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            // ADD YOUR ACTION CODE HERE ...

            SetButtonEnabled(oForm);

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0150T_HRD");
            gDocEntry = oDB_M.GetValue("DocEntry", 0).Trim();

            oGrid = ((SAPbouiCOM.Grid)(oForm.Items.Item("grd").Specific));
            SetGridTitle(oForm, false);

            GetSum(oForm);
        }