예제 #1
0
        private void InitiallizeForm()
        {
            Program.objHrmsUI.loadSettings();
            oForm.Freeze(true);



            dtHead    = oForm.DataSources.DataTables.Item("dtHead");
            dtSetting = oForm.DataSources.DataTables.Item("dtSetting");
            dtSetting.Rows.Add(1);
            mtAddon = (SAPbouiCOM.Matrix)oForm.Items.Item("mtAddon").Specific;

            txDfltExp = (SAPbouiCOM.EditText)oForm.Items.Item("txDfltExp").Specific;

            txUID     = (SAPbouiCOM.EditText)oForm.Items.Item("txUID").Specific;
            txPWD     = (SAPbouiCOM.EditText)oForm.Items.Item("txPWD").Specific;
            txINCCode = (SAPbouiCOM.EditText)oForm.Items.Item("txINCCode").Specific;
            txLTDCode = (SAPbouiCOM.EditText)oForm.Items.Item("txLTDCode").Specific;
            txINCDB   = (SAPbouiCOM.EditText)oForm.Items.Item("txINCDB").Specific;
            txLTDDB   = (SAPbouiCOM.EditText)oForm.Items.Item("txLTDDB").Specific;
            txTax     = (SAPbouiCOM.EditText)oForm.Items.Item("txTax").Specific;

            cflDE = oForm.ChooseFromLists.Item("cflDE");
            fillAddons();
            fillSettings();
            filtertocfl();

            oForm.Freeze(false);
        }
예제 #2
0
        private void InitiallizeForm()
        {
            Program.objHrmsUI.loadSettings();

            oForm.Freeze(true);

            initiallizing = true;


            mtWO = (SAPbouiCOM.Matrix)oForm.Items.Item("mtWO").Specific;
            mtOD = (SAPbouiCOM.Matrix)oForm.Items.Item("mtOD").Specific;

            lblStatus = (SAPbouiCOM.StaticText)oForm.Items.Item("lblStatus").Specific;
            dtRDR1    = oForm.DataSources.DataTables.Item("dtRDR1");
            dtORDR    = oForm.DataSources.DataTables.Item("dtORDR");
            dtHead    = oForm.DataSources.DataTables.Item("dtHead");
            dtCard    = oForm.DataSources.DataTables.Item("dtCard");
            dtWebO    = oForm.DataSources.DataTables.Item("dtWebO");

            cbOS = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOS").Specific;
            cbOS.ValidValues.Add("01", "All");
            cbOS.ValidValues.Add("02", "Not Posted");
            cbOS.ValidValues.Add("03", "Posted");
            cbOS.Item.DisplayDesc = true;
            cbOS.Select("01", BoSearchKey.psk_ByValue);
            txCEmail  = (SAPbouiCOM.EditText)oForm.Items.Item("txCEmail").Specific;
            txCNCode  = (SAPbouiCOM.EditText)oForm.Items.Item("txCNCode").Specific;
            txCNTel   = (SAPbouiCOM.EditText)oForm.Items.Item("txCNTel").Specific;
            txCNEmail = (SAPbouiCOM.EditText)oForm.Items.Item("txCNEmail").Specific;
            txSName   = (SAPbouiCOM.EditText)oForm.Items.Item("txSName").Specific;
            txSSPO    = (SAPbouiCOM.EditText)oForm.Items.Item("txSSPO").Specific;
            txSCity   = (SAPbouiCOM.EditText)oForm.Items.Item("txSCity").Specific;
            txSState  = (SAPbouiCOM.EditText)oForm.Items.Item("txSState").Specific;
            txSZip    = (SAPbouiCOM.EditText)oForm.Items.Item("txSZip").Specific;
            txSPhone  = (SAPbouiCOM.EditText)oForm.Items.Item("txSPhone").Specific;
            txSEmail  = (SAPbouiCOM.EditText)oForm.Items.Item("txSEmail").Specific;

            txFrom = (SAPbouiCOM.EditText)oForm.Items.Item("txFrom").Specific;
            txTo   = (SAPbouiCOM.EditText)oForm.Items.Item("txTo").Specific;



            txCTel  = (SAPbouiCOM.EditText)oForm.Items.Item("txCTel").Specific;
            txCCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCCode").Specific;

            cbOS   = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbOS").Specific;
            btPost = (SAPbouiCOM.Button)oForm.Items.Item("btPost").Specific;
            btGet  = (SAPbouiCOM.Button)oForm.Items.Item("btGet").Specific;
            //   ini_controls();

            dtHead.Rows.Add(1);

            string INCCard = Program.objHrmsUI.getSetting("LTDCODE").ToString();

            dtHead.SetValue("CardCode", 0, INCCard);
            oForm.PaneLevel = 1;
            oForm.Freeze(false);

            initiallizing = false;
        }
예제 #3
0
파일: frm_INSP.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            initiallizing = true;

            dtDoc  = oForm.DataSources.DataTables.Item("dtDoc");
            dtRow  = oForm.DataSources.DataTables.Item("dtRow");
            dtRpt  = oForm.DataSources.DataTables.Item("dtRpt");
            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            dtSB   = oForm.DataSources.DataTables.Item("dtSB");

            dtHead.Rows.Add(1);
            mtDocs    = (SAPbouiCOM.Matrix)oForm.Items.Item("mtDocs").Specific;
            mtDocRows = (SAPbouiCOM.Matrix)oForm.Items.Item("mtDocRows").Specific;
            mtRpt     = (SAPbouiCOM.Matrix)oForm.Items.Item("mtRpt").Specific;
            mtSB      = (SAPbouiCOM.Matrix)oForm.Items.Item("mtSB").Specific;
            btAtt     = (SAPbouiCOM.Button)oForm.Items.Item("btAtt").Specific;

            txAtt = (SAPbouiCOM.EditText)oForm.Items.Item("txAtt").Specific;
            txAtt.Item.Enabled = false;
            getUserWHSAndOT();

            // oForm.Items.Item("btUpd").Enabled = false;
            oForm.Freeze(false);

            getDocs();
            initiallizing = false;
        }
예제 #4
0
        public static klib.Dynamic GetValue(ref SAPbouiCOM.Matrix matrix, int row, dynamic col, string msgnull = null, string invalidValue = null)
        {
            var oItem = matrix.Columns.Item(col).Cells.Item(row);
            var value = String.Empty;

            switch (oItem.Type)
            {
            case SAPbouiCOM.BoFormItemTypes.it_EDIT:
            case SAPbouiCOM.BoFormItemTypes.it_EXTEDIT:
                value = ((SAPbouiCOM.EditText)oItem.Specific).Value; break;

            case SAPbouiCOM.BoFormItemTypes.it_COMBO_BOX:
                value = ((SAPbouiCOM.ComboBox)oItem.Specific).Selected.Value; break;

            case SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX:
                value = ((SAPbouiCOM.CheckBox)oItem.Specific).Checked.ToString(); break;

            default:
                throw new SUIException(1, $"The item {oItem.UniqueID} not exist.");
            }

            if (!String.IsNullOrEmpty(invalidValue) && value.Trim().Equals(invalidValue, StringComparison.InvariantCultureIgnoreCase))
            {
                throw new SUIException(11, oItem.UniqueID, oItem.Description);
            }

            if (!String.IsNullOrEmpty(msgnull) && String.IsNullOrEmpty(value))
            {
                throw new SUIException(10, oItem.UniqueID, oItem.Description);
            }

            return(klib.ValuesEx.To(value));
        }
예제 #5
0
        /// <summary>
        /// Valida que los planes que cancelados tengan la inversión inicial en ceros
        /// </summary>
        /// <param name="_oForm">Forma activa</param>
        /// <returns>Mensaje de error</returns>
        private string ValidarStatusSolicitudGrid(Form _oForm)
        {
            try
            {
                string msgError = null;
                _oMatrixArticulos = _oForm.Items.Item(GRID_ARTICULOS).Specific;
                SAPbouiCOM.ComboBox _oCmbStatusSolicitud = null;
                SAPbouiCOM.EditText _oInversionIni       = null;
                SAPbouiCOM.EditText _oSolicitud          = null;

                for (int noLinea = 1; noLinea <= _oMatrixArticulos.RowCount; noLinea++)
                {
                    _oCmbStatusSolicitud = (SAPbouiCOM.ComboBox)_oMatrixArticulos.Columns.Item(COLUMNA_STATUS_DE_SOLICITUD).Cells.Item(noLinea).Specific;
                    _oInversionIni       = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_IVERSION_INICIAL).Cells.Item(noLinea).Specific;
                    _oSolicitud          = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_SERIE).Cells.Item(noLinea).Specific;

                    if (_oCmbStatusSolicitud.Selected.Value.Contains('N'))
                    {
                        if (Convert.ToDouble(_oInversionIni.Value) != 0)
                        {
                            return(msgError = "Monto de la inversión inicial debe estar en ceros " + Environment.NewLine +
                                              "Solicitud: " + _oSolicitud.Value.ToString() + Environment.NewLine + " Estatus: ERRONEO");
                        }
                    }

                    if (_oCmbStatusSolicitud.Selected.Value.Contains('C'))
                    {
                        if (Convert.ToDouble(_oInversionIni.Value) != 0)
                        {
                            return(msgError = "Monto de la inversión inicial deber estar en ceros " + Environment.NewLine +
                                              "Solicitud: " + _oSolicitud.Value.ToString() + Environment.NewLine + " Estatus: CANCELADO");
                        }
                    }

                    if (_oCmbStatusSolicitud.Selected.Value.Contains('A'))
                    {
                        if (Convert.ToDouble(_oInversionIni.Value) != 0)
                        {
                            return(msgError = "Monto de la inversión inicial deber estar en ceros " + Environment.NewLine +
                                              "Solicitud: " + _oSolicitud.Value.ToString() + Environment.NewLine + " Estatus: ATRACO");
                        }
                    }

                    if (_oCmbStatusSolicitud.Selected.Value.Contains('E'))
                    {
                        if (Convert.ToDouble(_oInversionIni.Value) != 0)
                        {
                            return(msgError = "Monto de la inversión inicial deber estar en ceros " + Environment.NewLine +
                                              "Solicitud: " + _oSolicitud.Value.ToString() + Environment.NewLine + " Estatus: EXTRAVIO");
                        }
                    }
                }
                return(msgError);
            }
            catch (Exception ex)
            {
                throw new Exception("Error al validar estatus de solicitudes del grid *ValidarStatusSolicitudGrid* : " + ex.Message);
            }
        }
예제 #6
0
 private void SetSalesOrderControls()
 {
     mSalesOrderForm      = SAPbouiCOM.Framework.Application.SBO_Application.Forms.GetFormByTypeAndCount(139, -1);
     mSalesOrderForm.Mode = BoFormMode.fm_ADD_MODE;
     mObjSOMtx            = (SAPbouiCOM.Matrix)mSalesOrderForm.Items.Item("38").Specific;
     //SAPbouiCOM.EditText lll = (SAPbouiCOM.EditText)mSalesOrderForm.Items.Item("4").Specific;
     //lll.Value = "CL00000002";
 }
        public new bool InitForm(string uid, string xmlPath, ref Application application, ref SAPbobsCOM.Company company, ref CSBOFunctions SBOFunctions, ref TGlobalVid _GlobalSettings)
        {
            //SAPbouiCOM.ComboBox oCombo;
            SAPbouiCOM.Column oColumn;
            bool Result = base.InitForm(uid, xmlPath, ref application, ref company, ref SBOFunctions, ref _GlobalSettings);

            try
            {
                oRecordSet = (SAPbobsCOM.Recordset)(FCmpny.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));

                //Lista    := New list<string>;

                FSBOf.LoadForm(xmlPath, "VID_IndicadoresSII.srf", uid);
                //EnableCrystal := true;
                //oForm = FSBOApp.Forms.Item(uid);
                oForm = FSBOApp.Forms.ActiveForm;
                oForm.Freeze(true);
                oForm.AutoManaged    = false;
                oForm.SupportedModes = -1;             // afm_All

                VID_DelRow   = true;
                VID_DelRowOK = true;

                oForm.DataBrowser.BrowseBy = "Code";
                oDBDSH = oForm.DataSources.DBDataSources.Item("@VID_FEDOCE");
                oDBDSD = oForm.DataSources.DBDataSources.Item("@VID_FEDOCED");

                // Ok Ad  Fnd Vw Rq Sec
                //Lista.Add('DocNum    , f,  f,  t,  f, n, 1');
                //Lista.Add('DocDate   , f,  t,  f,  f, r, 1');
                //Lista.Add('CardCode  , f,  t,  t,  f, r, 1');
                //FSBOf.SetAutoManaged(var oForm, Lista);

                //oCombo := ComboBox(oForm.Items.Item('TipDoc').Specific);
                //oCombo.ValidValues.Add('33', 'Factura');

                //s := '1';
                //oCombo.Select(s, BoSearchKey.psk_ByValue);

                AddChooseFromList();
                oMtx    = (Matrix)(oForm.Items.Item("mtx").Specific);
                oColumn = (SAPbouiCOM.Column)(oMtx.Columns.Item("V_0"));
                oColumn.ChooseFromListUID   = "CFL0";
                oColumn.ChooseFromListAlias = "Code";

                oMtx.AutoResizeColumns();

                //EditText(oForm.Items.Item('CardCode').Specific).Active := True;
                //oForm.Mode := BoFormMode.fm_OK_MODE;
            }
            catch (Exception e)
            {
                OutLog("InitForm: " + e.Message + " ** Trace: " + e.StackTrace);
                FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", "");
            }
            oForm.Freeze(false);
            return(Result);
        }//fin InitForm
예제 #8
0
        ///<summary>    Loads matrix columns. </summary>
        ///<remarks>    Amartinez, 08/05/2017. </remarks>
        ///<param name="pStrDataSource">    The pstr datasource. </param>
        public SAPbouiCOM.Matrix LoadMatrixColumns(SAPbouiCOM.Matrix pObjMatrix, string pStrDataSource, bool pBolIsPurshese, string pStrTypTic)
        {
            SAPbouiCOM.Matrix lObjMatrix = DeleteColumns(pObjMatrix);
            bool lBolColumnEnable        = false;

            lBolColumnEnable = pBolIsPurshese;
            //SAPbouiCOM.CommonSetting setting = mObjMatrix.CommonSetting;
            // Add a column for BP Card Code
            SAPbouiCOM.IColumn lObjColumn;
            lObjColumn = lObjMatrix.Columns.Add("ItemCode", SAPbouiCOM.BoFormItemTypes.it_LINKED_BUTTON);
            lObjColumn.TitleObject.Caption = "Artículo";
            lObjColumn.DataBind.SetBound(true, pStrDataSource, "ItemCode");
            lObjColumn.Editable = true;

            // Link the column to the BP master data system form
            var lObjlink = ((SAPbouiCOM.LinkedButton)(lObjColumn.ExtendedObject));

            lObjlink.LinkedObject        = SAPbouiCOM.BoLinkedObject.lf_Items;
            lObjColumn.ChooseFromListUID = "CFL1";
            lObjColumn.Editable          = true;

            //addColum()
            AddColum(lObjMatrix, "Dscription", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Descripción", pStrDataSource, "Dscription", false);
            AddColum(lObjMatrix, "Price", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Precio", pStrDataSource, "Price", lBolColumnEnable);
            AddColum(lObjMatrix, "Peso1", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Primer peso", pStrDataSource, "Weight1", false);
            AddColum(lObjMatrix, "Peso2", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Segundo peso", pStrDataSource, "Weight2", false);
            AddColum(lObjMatrix, "PesoN", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Peso Neto", pStrDataSource, "Quantity", false);
            AddColum(lObjMatrix, "Importe", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Importe", pStrDataSource, "LineTotal", false);

            if (pStrTypTic != "Venta de pesaje" && pStrTypTic != "Pesaje")
            {
                AddColum(lObjMatrix, "Sacos", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Sacos - Pacas", pStrDataSource, "U_GLO_BagsBales", true);
                AddColum(lObjMatrix, "Check", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX, "Tipo peso", pStrDataSource, "TreeType", true);
                lObjColumn = lObjMatrix.Columns.Add("WhsCode", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                lObjColumn.TitleObject.Caption = "Almacén";

                if (pStrTypTic != "Traslado - Salida")
                {
                    lObjColumn.DataBind.SetBound(true, pStrDataSource, "WhsCode");
                }
                else
                {
                    lObjColumn.DataBind.SetBound(true, pStrDataSource, "FromWhsCod");
                }
                lObjColumn.ChooseFromListUID = "CFL_Ware";
                lObjColumn.Editable          = true;
            }
            else
            {
                AddColum(lObjMatrix, "Check", SAPbouiCOM.BoFormItemTypes.it_CHECK_BOX, "Tipo peso", pStrDataSource, "TreeType", false);
            }
            AddColum(lObjMatrix, "DelivrdQty", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Cantidad entregada", pStrDataSource, "DelivrdQty", false);
            AddColum(lObjMatrix, "OpenCreQty", SAPbouiCOM.BoFormItemTypes.it_EDIT, "Cantidad pendiente", pStrDataSource, "OpenCreQty", false);


            lObjMatrix.AutoResizeColumns();
            return(lObjMatrix);
        }
예제 #9
0
 /// <summary>
 /// Evento que se ejecuta cuando se encuentra un mensaje de status
 /// </summary>
 /// <param name="Text">Texto que se esta mostrando</param>
 /// <param name="messageType">Tipo de mensaje</param>
 private void SBO_Application_StatusBarEvent(string Text, BoStatusBarMessageType messageType)
 {
     try
     {
         if (Text.Contains("No se puede añadir fila") && messageType == BoStatusBarMessageType.smt_Warning)
         {
             if (_Application.Forms.ActiveForm.TypeEx == FRM_TRANSFERENCIA_DE_STOCK.ToString())
             {
                 if (_oForm.Mode == BoFormMode.fm_ADD_MODE)
                 {
                     lDatos.Clear();
                     _oMatrixArticulos = _oForm.Items.Item(GRID_ARTICULOS).Specific;
                     int x = 1;
                     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;
                             oSerie       = (SAPbouiCOM.EditText)_oMatrixArticulos.Columns.Item(COLUMNA_SERIE).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();
                                 itemDatos.noLinea    = x;
                                 lDatos.Add(itemDatos);
                                 x += 1;
                             }
                             else if (!string.IsNullOrEmpty(oSerie.Value.ToString()))
                             {
                                 itemDatos            = new Datos();
                                 itemDatos.itemCode   = oItemCode.Value.ToString();
                                 itemDatos.serieInial = oSerie.Value.ToString();
                                 itemDatos.serieFinal = oSerie.Value.ToString();
                                 itemDatos.noLinea    = x;
                                 lDatos.Add(itemDatos);
                                 x += 1;
                             }
                         }
                     }
                     if (lDatos.Count != 0)
                     {
                         Addon.Instance.Ejecutaclase("25", lDatos);
                     }
                 }
             }
         }
     }
     catch (Exception ex)
     {
         _Application.MessageBox("Error en StatusBarEvent *clsTransferenciaDeStock* : " + ex.Message);
     }
 }
예제 #10
0
 public static void DelRowWithoutDSource(ref SAPbouiCOM.Matrix matrix)
 {
     try
     {
         var lineSelected = matrix.GetCellFocus().rowIndex;
         matrix.DeleteRow(lineSelected);
     }catch (Exception ex)
     {
         klib.Shell.WriteLine(R.Project.ID, LOG, ex);
         SUI.Forms.Notification.SendToBarMessage(true, $"Occur a internal error to delete the line. Matrix {matrix.Item.Description}");
     }
 }
예제 #11
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);
        }
예제 #12
0
파일: frm_ADM.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            initiallizing = true;

            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            dtList = oForm.DataSources.DataTables.Item("dtList");

            dtA  = oForm.DataSources.DataTables.Item("dtA");
            dtS  = oForm.DataSources.DataTables.Item("dtS");
            dtAW = oForm.DataSources.DataTables.Item("dtAW");
            dtSW = oForm.DataSources.DataTables.Item("dtSW");



            mtA  = (SAPbouiCOM.Matrix)oForm.Items.Item("mtA").Specific;
            mtS  = (SAPbouiCOM.Matrix)oForm.Items.Item("mtS").Specific;
            mtAW = (SAPbouiCOM.Matrix)oForm.Items.Item("mtAW").Specific;
            mtSW = (SAPbouiCOM.Matrix)oForm.Items.Item("mtSW").Specific;


            mtList = (SAPbouiCOM.Matrix)oForm.Items.Item("mtList").Specific;

            dtHead.Rows.Add(1);


            txCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCode").Specific;
            txName = (SAPbouiCOM.EditText)oForm.Items.Item("txName").Specific;

            btAdd  = (SAPbouiCOM.Button)oForm.Items.Item("btAdd").Specific;
            btAddA = (SAPbouiCOM.Button)oForm.Items.Item("btAddA").Specific;
            btDelA = (SAPbouiCOM.Button)oForm.Items.Item("btDelA").Specific;
            btAddW = (SAPbouiCOM.Button)oForm.Items.Item("btAddW").Specific;
            btDelW = (SAPbouiCOM.Button)oForm.Items.Item("btDelW").Specific;

            cbPWHS = (SAPbouiCOM.ComboBox)oForm.Items.Item("cbPWHS").Specific;


            cflCode = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflCode");



            // oForm.Items.Item("btUpd").Enabled = false;
            oForm.Freeze(false);

            initiallizing = false;
            getCodes();
        }
예제 #13
0
        public static void AddRowWithoutDSource(ref SAPbouiCOM.Matrix matrix, int qtty = 1)
        {
            try
            {
                matrix.AddRow(qtty);
                //matrix.FlushToDataSource();

                //matrix.AddRow(qtty);
                //matrix.LoadFromDataSource();
            }catch (Exception ex)
            {
                klib.Shell.WriteLine(R.Project.ID, LOG, ex);
                SUI.Forms.Notification.SendToBarMessage(true, $"Occur a internal error to add a new line. Matrix {matrix.Item.Description}");
            }
        }
예제 #14
0
        public static void SetValue(ref SAPbouiCOM.Matrix matrix, dynamic col, int row, object val)
        {
            var editable = matrix.Columns.Item(col).Editable;

            matrix.Columns.Item(col).Editable = true;

            try
            {
                val = klib.ValuesEx.To(val).ToString();
                matrix.SetCellWithoutValidation(row, col.ToString(), val.ToString());
            }
            finally
            {
                matrix.Columns.Item(col).Editable = editable;
            }
        }
예제 #15
0
        private void SetFormSettings(Form pFrmActive)
        {
            try
            {
                mObjSOForm      = pFrmActive;//SAPbouiCOM.Framework.Application.SBO_Application.Forms.GetFormByTypeAndCount(pFrmActive.Type, pFrmActive.TypeCount);
                mIntFormType    = pFrmActive.Type;
                mObjTxtCardCode = (SAPbouiCOM.EditText)mObjSOForm.Items.Item("4").Specific;


                mObjMtxSO  = (SAPbouiCOM.Matrix)mObjSOForm.Items.Item("38").Specific;
                mObjCboDoc = (SAPbouiCOM.ComboBox)mObjSOForm.Items.Item("81").Specific;
            }
            catch (Exception)
            {
                //ignore
            }
        }
예제 #16
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);
            }
        }
예제 #17
0
파일: frm_AS.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            oForm.Freeze(true);

            initiallizing = true;

            dtA    = oForm.DataSources.DataTables.Item("dtA");
            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            dtS    = oForm.DataSources.DataTables.Item("dtS");
            dtList = oForm.DataSources.DataTables.Item("dtList");

            mtA    = (SAPbouiCOM.Matrix)oForm.Items.Item("mtA").Specific;
            mtS    = (SAPbouiCOM.Matrix)oForm.Items.Item("mtS").Specific;
            mtList = (SAPbouiCOM.Matrix)oForm.Items.Item("mtList").Specific;

            dtHead.Rows.Add(1);


            txCode = (SAPbouiCOM.EditText)oForm.Items.Item("txCode").Specific;
            txName = (SAPbouiCOM.EditText)oForm.Items.Item("txName").Specific;

            btAdd  = (SAPbouiCOM.Button)oForm.Items.Item("btAdd").Specific;
            btAddA = (SAPbouiCOM.Button)oForm.Items.Item("btAddA").Specific;
            btDelA = (SAPbouiCOM.Button)oForm.Items.Item("btDelA").Specific;


            opI = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opI").Specific;
            opG = (SAPbouiCOM.OptionBtn)oForm.Items.Item("opG").Specific;


            cflCode  = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflCode");
            cflGroup = (SAPbouiCOM.ChooseFromList)oForm.ChooseFromLists.Item("cflGroup");



            opG.GroupWith("opI");
            opG.Selected = true;


            // oForm.Items.Item("btUpd").Enabled = false;
            oForm.Freeze(false);

            initiallizing = false;
            getCodes();
        }
예제 #18
0
        private void AddMatrixNoForm()
        {
            LinkedButton oLink = null;

            oItem        = oForm.Items.Add("Matrix1", BoFormItemTypes.it_MATRIX);
            oItem.Left   = 5;
            oItem.Width  = 500;
            oItem.Top    = 5;
            oItem.Height = 150;

            oMatrix = ((SAPbouiCOM.Matrix)(oItem.Specific));

            oColumns = oMatrix.Columns;

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

            oColumn = oColumns.Add("DSCardCode", BoFormItemTypes.it_LINKED_BUTTON);
            oColumn.TitleObject.Caption = "Card Code";
            oColumn.Width    = 40;
            oColumn.Editable = true;

            oLink = (oColumn).ExtendedObject;
            oLink.LinkedObject = BoLinkedObject.lf_BusinessPartner;

            oColumn = oColumns.Add("DSCardName", BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Name";
            oColumn.Width    = 40;
            oColumn.Editable = true;


            oColumn = oColumns.Add("DSPhone", BoFormItemTypes.it_EDIT);
            oColumn.TitleObject.Caption = "Phone";
            oColumn.Width    = 40;
            oColumn.Editable = true;


            //oColumn = oColumns.Add("DSPhone", BoFormItemTypes.it_EDIT);
            //oColumn.TitleObject.Caption = "Int.Phone";
            //oColumn.Width = 40;
            //oColumn.Editable = true;
        }
예제 #19
0
        /// <summary>
        /// Elimina las columnas (Para cargar nuevamente la matriz)
        /// </summary>
        public SAPbouiCOM.Matrix DeleteColumns(SAPbouiCOM.Matrix pObjMatrix)
        {
            int lIntRow = pObjMatrix.RowCount;

            if (lIntRow > 0)
            {
                for (int i = lIntRow; i > 0; i--)
                {
                    pObjMatrix.DeleteRow(i);
                }
            }
            int lIntCount = pObjMatrix.Columns.Count;

            for (int i = 0; i < lIntCount; i++)
            {
                pObjMatrix.Columns.Remove(0);
            }

            return(pObjMatrix);
        }
예제 #20
0
        public static void clsSalesOrder_MenuEvent(ref SAPbouiCOM.Application oApplication, ref SAPbobsCOM.Company oCompany, SAPbouiCOM.Form oForm, ref SAPbouiCOM.MenuEvent pVal, ref bool BubbleEvent)
        {
            try
            {
                oHDBDataSource   = oForm.DataSources.DBDataSources.Item("ORDR");
                oChildDataSource = oForm.DataSources.DBDataSources.Item("RDR1");
                oMatrix          = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;

                if (pVal.BeforeAction)
                {
                    if (pVal.MenuUID == "1299")
                    {
                    }
                    if (pVal.MenuUID == "DeleteRow" && oForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE)
                    {
                    }
                }
            }
            catch (Exception ex)
            {
                oApplication.MessageBox(ex.Message.ToString() + "/" + oCompany.GetLastErrorDescription().ToString(), 1, "OK", "", "");
            }
        }
예제 #21
0
파일: frm_DRSC.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            //  dtHead = oForm.DataSources.DataTables.Item("dtHead");
            // dtHead.Rows.Add(1);

            oForm.Freeze(true);

            dtDetail = oForm.DataSources.DataTables.Item("dtDetail");
            dtHead   = oForm.DataSources.DataTables.Item("dtHead");
            dtDetail.Rows.Add(1);
            mtDet = oForm.Items.Item("mtDet").Specific;

            oForm.DataSources.UserDataSources.Add("txNum", SAPbouiCOM.BoDataType.dt_LONG_NUMBER, 12); // Days of Month
            txNum = oForm.Items.Item("txNum").Specific;
            txNum.DataBind.SetBound(true, "", "txNum");



            txNum = oForm.Items.Item("txNum").Specific;

            mtDet.LoadFromDataSource();

            oForm.Freeze(false);
        }
예제 #22
0
        public virtual void ET_btnSTOP_AFItemPressed(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("btnSTOP").Specific));
            // ADD YOUR ACTION CODE HERE ...

            int idx = 0;
            string strRowStat = string.Empty;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");

                
                string strNowDate  = B1Connections.diCompany.GetCompanyDate().ToShortDateString();
                strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);

                string strStopDate = oForm.DataSources.UserDataSources.Item("edtSTOPDT").ValueEx;
                
                //if (String.IsNullOrEmpty(strNowDate))
                //{
                //    B1Connections.theAppl.StatusBar.SetText("중지 일자가 입력되지 않았습니다.", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                //    //oForm.Items.Item("btnSTOP").Click(0);
                //    return ;
                //}

                for (int i = 1; i <= oMatrix.VisualRowCount; i++)
                {
                    idx = GetDataTableIndexByMatrix(oMatrix, i);
                    strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값

                    if (strNowDate.CompareTo(strStopDate) >= 0)
                    {
                        // 상태값
                        oMatrix.SetCellWithoutValidation(i, "U_STATUS", "US");
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "US";

                    }
                    else
                    {
                        // 상태값
                        oMatrix.SetCellWithoutValidation(i, "U_STATUS", "UO");
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = "UO";

                    }


                    // 중지일자
                    //oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strStopDate);
                    //gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);
                    oMatrix.SetCellWithoutValidation(i, "U_CLOSEDT", strNowDate);
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);

                    // 배달종료일자 
                    oMatrix.SetCellWithoutValidation(i, "U_DELVTO", strStopDate);
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = FN.SetDateFormatToDB(strStopDate, FN.eDateType.n_YYYYMMDD);

                    if (string.IsNullOrEmpty(strRowStat))
                    {
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";
                        SetSumNumberOfCofies(oForm);
                    }
                }

                if (oMatrix.VisualRowCount > 0)
                {
                    oMatrix.FlushToDataSource();

                    if (oForm.Mode == BoFormMode.fm_OK_MODE)
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                }
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #23
0
        private void ClearUnManagedObject()
        {
            if (oComboBox != null) { Marshal.ReleaseComObject(oComboBox); } oComboBox = null;
            if (oGrid != null) { Marshal.ReleaseComObject(oGrid); } oGrid = null;
            if (oUDS != null) { Marshal.ReleaseComObject(oUDS); } oUDS = null;
            //if (gDs.Tables[oForm.UniqueID + "_Deliver"] != null) gDs.Tables[oForm.UniqueID + "_Deliver"] = null;
            //if (gDs.Tables[oForm.UniqueID + "_Call"] != null) gDs.Tables[oForm.UniqueID + "_Call"] = null;
            if (gDs != null)
            {
                if(gDs.Tables.Contains(oForm.UniqueID + "_Deliver"))
                {
                    gDs.Tables.Remove(oForm.UniqueID + "_Deliver");
                }

                if (gDs.Tables.Contains(oForm.UniqueID + "_Call"))
                {
                    gDs.Tables.Remove(oForm.UniqueID + "_Call");
                }
            }
            if (oDB_M != null) { Marshal.ReleaseComObject(oDB_M); } oDB_M = null;
            if (oMatrix != null) { Marshal.ReleaseComObject(oMatrix); } oMatrix = null;
            if (oDB1_O != null) { Marshal.ReleaseComObject(oDB1_O); } oDB1_O = null;
            if (oDB1_Z != null) { Marshal.ReleaseComObject(oDB1_Z); } oDB1_Z = null;
            if (oDB2_O != null) { Marshal.ReleaseComObject(oDB2_O); } oDB2_O = null;
            if (oDB2_Z != null) { Marshal.ReleaseComObject(oDB2_Z); } oDB2_Z = null;
            if (oRS != null) { Marshal.ReleaseComObject(oRS); } oRS = null;
            if (oEditText != null) { Marshal.ReleaseComObject(oEditText); } oEditText = null;

            if ((oForm != null))
            {
                Marshal.ReleaseComObject(oForm);
            }
            oForm = null;
            // ADD YOUR ACTION CODE HERE ...
            System.GC.Collect();
            System.GC.WaitForPendingFinalizers();
        }
예제 #24
0
 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);
         }
     }
 }
예제 #25
0
        public virtual void ET_mtx1_DUMY_AFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
            SAPbouiCOM.DataTable oDataTable = oCFLEvento.SelectedObjects;
            bool bModify = false;

            try
            {
                int idx = GetDataTableIndexByMatrix(oMatrix, pVal.Row);
                switch (pVal.ColUID)
                {
                    case "U_PAYCD"://요금제
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_PAYNM"://요금제
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_PAYNM", oDataTable.GetValue("Name", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = oDataTable.GetValue("Name", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_SAILCD"://유치자
                        if (oDataTable != null)
                        {

                            string strUserCode = oDataTable.GetValue("U_EMPNO", 0).ToString();
                            string strUserName = oDataTable.GetValue("lastName", 0).ToString();

                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILCD", strUserCode);
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SAILNM", strUserName);

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILCD"] = strUserCode;
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = strUserName;


                            // 유치자 사용자의 부서정보를 조회한다.
                            string strDeptName = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.Dept_Name, strUserCode);

                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_SDEPT", strDeptName);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = strDeptName;

                            bModify = true;
                        }
                        break;
                    case "U_CENTCD"://분국
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();

                            bModify = true;
                        }
                        break;
                    case "U_CENTNM"://분국
                        if (oDataTable != null)
                        {
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTCD", oDataTable.GetValue("Code", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_CENTNM", oDataTable.GetValue("Name", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL1", oDataTable.GetValue("U_TEL1", 0).ToString());
                            oMatrix.SetCellWithoutValidation(pVal.Row, "U_BTEL2", oDataTable.GetValue("U_TEL2", 0).ToString());

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = oDataTable.GetValue("Code", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = oDataTable.GetValue("Name", 0).ToString();

                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL1"] = oDataTable.GetValue("U_TEL1", 0).ToString();
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["BTEL2"] = oDataTable.GetValue("U_TEL2", 0).ToString();

                            bModify = true;
                        }
                        break;
                    default:
                        break;
                }

                if (bModify)
                {
                    if (oForm.Mode == BoFormMode.fm_OK_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE)
                    {
                        if (gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString() == "")
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";
                        oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                oCFLEvento = null;
                oDataTable = null;
            }
        }
예제 #26
0
        public virtual void ET_AFRowDataMenu_Add(MenuEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.ActiveForm;
            // ADD YOUR ACTION CODE HERE ...


            string strCode = string.Empty;
            string strDELIVCD = string.Empty;

            if (gSelMtx == "mtx1_DUMY")
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific;
                oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");

                // 배달코드 생성
                strDELIVCD = GetMaxDelivCode(oForm);

                // SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다.
                int index = AddRowDataTable_DELIVER(oForm, strDELIVCD);

                SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB1_Z, index.ToString(), strDELIVCD, "U_DELVCD");
            }
            else
            {
                // 배달리스트에서 선택된 라인의 배달코드
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;


                int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);
                strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex);

                oDB2_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");

                // SystemDataTable에 행 추가하고 추가된 Index값을 리턴받는다.
                int index = AddRowDataTable_CALL(oForm, strDELIVCD);

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB2_Z, index.ToString(), strDELIVCD, "U_DELVCD");

                // 상담리스트에 행추가하고 선택된 행의 Index 값을 가져와서 선택된 행의 수정여부를 수정한다.
                iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);

                oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gCallTp_IDX, true);// 콜유형
                oMatrix.CommonSetting.SetCellEditable(iSelectIndex, gComment_IDX, true);// 접수내용

            }
            B1Connections.theAppl.StatusBar.SetText(pVal.MenuUID.ToString(), SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_None);
        }
예제 #27
0
        private bool DeleteMatrixRows_CALL(string pDeliveryCode)
        {
            bool bRtnValue = true;
            System.Data.DataRow[] findRows = null;
            string strIdx = string.Empty;
            int iBtnValue = -1;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
                findRows = gDs.Tables[oForm.UniqueID + "_Call"].Select(string.Format(" DELVCD = '{0}' ", pDeliveryCode));

                // 1. 메트릭스 삭제대상 삭제 적용
                if (findRows.Count() > 0)
                {
                    iBtnValue = B1Connections.theAppl.MessageBox("상담이력이 존재 합니다. 삭제하시겠습니까?", 1, "&Yes", "&No", "");

                    if (iBtnValue == 1)
                    {
                        foreach (System.Data.DataRow dr in findRows)
                        {
                            //삭제할것들 선택한다.
                            strIdx = dr["IDX"].ToString();
                            oMatrix.SelectRow(int.Parse(strIdx) + 1, true, true);

                            gDs.Tables[oForm.UniqueID + "_Call"].Rows.Remove(dr);
                        }

                        // 선택된 Rows를 삭제한다.
                        int iSelectIdx = 0;

                        while (iSelectIdx != -1)
                        {
                            iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                            if (iSelectIdx != -1)
                                oMatrix.DeleteRow(iSelectIdx);
                        }
                        if (findRows.Count() > 0)
                            oMatrix.FlushToDataSource();
                    }
                    else
                        bRtnValue = false;
                }
            }

            catch (Exception)
            {
                bRtnValue = false;
                throw;
            }
            finally
            {
                findRows = null;
            }
            return bRtnValue;
        }
예제 #28
0
 public virtual bool ET_mtx1_DUMY_BFValidate(ItemEvent pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
     // ADD YOUR ACTION CODE HERE ...
     return true;
 }
예제 #29
0
        private void FindData(SAPbouiCOM.Form oForm)
        {
            string strExpr = string.Empty;
            string strSort = string.Empty;

            /* 조회조건 */
            string strF_DEPT = string.Empty;    // 구독부서
            string strF_TEL = string.Empty;     // 전화번호
            string strF_ADDR = string.Empty;    // 주소
            string strF_CENTER = string.Empty;  // 지국(분국)
            string strF_STATUS = string.Empty;  // 상태


            System.Data.DataRow[] findRows = null;
            StringBuilder sb = new StringBuilder();
            int i = 0;

            try
            {
                /*조회조건 값 가져오기 */
                oUDS = oForm.DataSources.UserDataSources;

                strF_DEPT = oUDS.Item("edtF_RDEPT").Value;
                strF_TEL = oUDS.Item("edtF_TEL").Value;
                strF_ADDR = oUDS.Item("edtF_ADDR").Value;
                strF_CENTER = oUDS.Item("edtF_CENT").Value;
                strF_STATUS = oUDS.Item("cboF_STATU").Value;

                oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
                oDB1_Z.Clear();

                sb.Append(" 1 = 1                               ");
                if (!string.IsNullOrEmpty(strF_DEPT)) //구독부서
                    sb.AppendFormat(" AND RDEPT LIKE '%{0}%'         ", strF_DEPT);
                if (!string.IsNullOrEmpty(strF_TEL)) //전화번호
                    sb.AppendFormat(" AND TEL LIKE '%{0}%'           ", strF_TEL);
                if (!string.IsNullOrEmpty(strF_ADDR)) //주소
                    sb.AppendFormat(" AND (ADDR1 LIKE '%{0}%' OR ADDR1_D LIKE '%{0}%' OR ADDR2 LIKE '%{0}%' OR ADDR2_D LIKE '%{0}%' )  ", strF_ADDR);
                if (!string.IsNullOrEmpty(strF_CENTER)) //지국
                    sb.AppendFormat(" AND CENTNM LIKE '%{0}%'        ", strF_CENTER);
                if (!string.IsNullOrEmpty(strF_STATUS)) //상태
                    sb.AppendFormat(" AND STATUS = '{0}'        ", strF_STATUS);

                // 정렬 기준
                findRows = gDs.Tables[oForm.UniqueID + "_Deliver"].Select(sb.ToString(), "LINEID ASC");

                foreach (System.Data.DataRow dr in findRows)
                {
                    oDB1_Z.InsertRecord(i);

                    oDB1_Z.SetValue("U_NO", i, (i + 1).ToString());
                    oDB1_Z.SetValue("U_IDX", i, dr["IDX"].ToString()); //"데이터테이블 고유번호 IDX";
                    oDB1_Z.SetValue("LineId", i, dr["LineId"].ToString());//"원본라인번호";
                    oDB1_Z.SetValue("U_DELVCD", i, dr["DELVCD"].ToString()); //"배달코드";
                    oDB1_Z.SetValue("U_RDEPT", i, dr["RDEPT"].ToString()); //"부서";
                    oDB1_Z.SetValue("U_PAPERTP", i, dr["PAPERTP"].ToString()); //"지종";
                    oDB1_Z.SetValue("U_READTP", i, dr["READTP"].ToString()); //"독자구분";
                    oDB1_Z.SetValue("U_PAYCD", i, dr["PAYCD"].ToString()); //"요금제코드";
                    oDB1_Z.SetValue("U_PAYNM", i, dr["PAYNM"].ToString()); //"요금제명";
                    oDB1_Z.SetValue("U_TEL", i, dr["TEL"].ToString()); //"연락처";
                    oDB1_Z.SetValue("U_MOBILE", i, dr["MOBILE"].ToString()); //"휴대폰";
                    oDB1_Z.SetValue("U_ADDR1", i, dr["ADDR1"].ToString()); //"주소1";
                    oDB1_Z.SetValue("U_ADDR2", i, dr["ADDR2"].ToString()); //"주소2";
                    oDB1_Z.SetValue("U_ADDR1_D", i, dr["ADDR1_D"].ToString()); //"주소1상세";
                    oDB1_Z.SetValue("U_ADDR2_D", i, dr["ADDR2_D"].ToString()); //"주소2상세";
                    oDB1_Z.SetValue("U_CENTCD", i, dr["CENTCD"].ToString()); //"지국";
                    oDB1_Z.SetValue("U_CENTNM", i, dr["CENTNM"].ToString()); //"지국명";
                    oDB1_Z.SetValue("U_DELVFR", i, FN.SetDateFormatToDB(dr["DELVFR"].ToString(), FN.eDateType.n_YYYYMMDD)); //"배달시작일";
                    oDB1_Z.SetValue("U_DELVTO", i, FN.SetDateFormatToDB(dr["DELVTO"].ToString(), FN.eDateType.n_YYYYMMDD)); //"배달종료일";
                    oDB1_Z.SetValue("U_DELVCNT", i, dr["DELVCNT"].ToString()); //"배달부수";
                    oDB1_Z.SetValue("U_METHOD", i, dr["METHOD"].ToString()); //"가입방법";
                    oDB1_Z.SetValue("U_SAILCD", i, dr["SAILCD"].ToString()); //"유치자";
                    oDB1_Z.SetValue("U_SAILNM", i, dr["SAILNM"].ToString()); //"유치자";
                    oDB1_Z.SetValue("U_SDEPT", i, dr["SDEPT"].ToString()); //"유치부서";
                    oDB1_Z.SetValue("U_NOTE", i, dr["NOTE"].ToString()); //"배달상세";
                    oDB1_Z.SetValue("U_STATUS", i, dr["STATUS"].ToString()); //"배달상태";

                    oDB1_Z.SetValue("U_JOINDT", i, FN.SetDateFormatToDB(dr["JOINDT"].ToString(), FN.eDateType.n_YYYYMMDD)); //"가입일자";
                    oDB1_Z.SetValue("U_CLOSEDT", i, FN.SetDateFormatToDB(dr["CLOSEDT"].ToString(), FN.eDateType.n_YYYYMMDD)); //"중지일자";

                    oDB1_Z.SetValue("U_USERSG1", i, dr["USERSG1"].ToString()); //"등록자";

                    oDB1_Z.SetValue("U_BTEL1", i, dr["BTEL1"].ToString()); //"분국전화1";
                    oDB1_Z.SetValue("U_BTEL2", i, dr["BTEL2"].ToString()); //"분국전화1";

                    i += 1;
                }

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oMatrix.LoadFromDataSource();
            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                findRows = null;
            }
        }
예제 #30
0
        /// <summary>
        /// Asigna los numero de serie correspondientes a cada artículo
        /// </summary>
        /// <param name="_oForm">Forma activa</param>
        private void AsignarNumerosDeSeries(Form _oForm)
        {
            try
            {
                _oForm.Freeze(true);
                _oMatrixSerieArticulos = _oForm.Items.Item(GRID_ARTICULOS_SERIE).Specific;

                for (int noLinea = 1; noLinea <= _oMatrixSerieArticulos.RowCount; noLinea++)
                {
                    _oMatrixSerieDefinir = _oForm.Items.Item(GRID_SERIE_DEFINIR).Specific;
                    if (_oMatrixSerieDefinir.RowCount == 1)
                    {
                        _oClaveArticulo   = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_CLAVE_ARTICULO).Cells.Item(noLinea).Specific;
                        _oTotalNecesarios = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_TOTAL_NECESITADOS).Cells.Item(noLinea).Specific;

                        var serieI = lDatosEntradaMercancia.ElementAt(noLinea - 1).serieInial;
                        var serieF = lDatosEntradaMercancia.ElementAt(noLinea - 1).serieFinal;

                        int x = 1;

                        string PrefijoSerie  = serieI.ToString().Substring(0, 6);
                        int    serieInicial  = Convert.ToInt32(serieI.ToString().Substring(6));
                        int    longitudSerie = serieI.ToString().Substring(6).Length;
                        int    serieFinal    = Convert.ToInt32(serieF.ToString().Substring(6));
                        int    totalSeries   = (serieFinal - serieInicial) + 1;
                        double necesarios    = Convert.ToDouble(_oTotalNecesarios.Value);

                        if (totalSeries <= necesarios)
                        {
                            while (serieInicial <= serieFinal)
                            {
                                _Application.StatusBar.SetText("Seleccionando serie " + _oClaveArticulo.Value.ToString() + " : " + x + " de " + totalSeries,
                                                               BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning);

                                if (serieInicial.ToString().Length < longitudSerie)
                                {
                                    _oMatrixSerieDefinir.Columns.Item(COLUMNA_SERIE_FABRICANTE).Cells.Item(x).Specific.Value = PrefijoSerie + serieInicial.ToString().PadLeft(longitudSerie, '0');
                                    _oMatrixSerieDefinir.Columns.Item(COLUMNA_NUMERO_SERIE).Cells.Item(x).Specific.Value     = PrefijoSerie + serieInicial.ToString().PadLeft(longitudSerie, '0');
                                }
                                else
                                {
                                    _oMatrixSerieDefinir.Columns.Item(COLUMNA_SERIE_FABRICANTE).Cells.Item(x).Specific.Value = PrefijoSerie + serieInicial.ToString();
                                    _oMatrixSerieDefinir.Columns.Item(COLUMNA_NUMERO_SERIE).Cells.Item(x).Specific.Value     = PrefijoSerie + serieInicial.ToString();
                                }

                                x            += 1;
                                serieInicial += 1;
                            }
                        }
                        else
                        {
                            _Application.MessageBox("El total de series es mayor al total necesitado: " + _oClaveArticulo.Value.ToString());
                        }
                    }

                    _oMatrixSerieArticulos = _oForm.Items.Item(GRID_ARTICULOS_SERIE).Specific;
                    if (_oMatrixSerieArticulos.RowCount >= 1)
                    {
                        SAPbouiCOM.Button item = _oForm.Items.Item(BTN_ACTUALIZAR).Specific;
                        if (item.Caption == "Actualizar")
                        {
                            _oForm.Items.Item(BTN_ACTUALIZAR).Click();
                        }
                    }
                    _oMatrixSerieArticulos = _oForm.Items.Item(GRID_ARTICULOS_SERIE).Specific;
                    if (noLinea < _oMatrixSerieArticulos.RowCount)
                    {
                        _oMatrixSerieArticulos.Columns.Item(COLUMNA_NIVEL_LINEA).Cells.Item(noLinea + 1).Click();
                    }
                }
                lDatosEntradaMercancia.Clear();
            }
            catch (Exception ex)
            {
                if (ex.Message.Contains("Form - Bad Value"))
                {
                    _Application.MessageBox("El número de Solicitud ya existe");
                }
                else
                {
                    throw new Exception("Error al asignar números de serie *AsignarNumerosDeSeries* : " + ex.Message);
                }
            }
            finally
            {
                _oForm.Freeze(false);
            }
        }
예제 #31
0
        public virtual void ET_mtx2_DUMY_AFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            if (pVal.Row > 0)
            {
                //1. 콜리스트를 선택하면 배달코드를 찾아 자동으로 선택되도록 한다.
                oMatrix.SelectRow(pVal.Row, true, false);


                // 1-1 콜리스트 선택된 것에서 배달코드를 찾는다.
                string strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pVal.Row);

                SAPbouiCOM.Matrix oMatrix1 = (SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific);

                // 2. 배달코드로 배송리스트에서 메트릭스의 행을 찾는다.
                var obj_Deliver = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
                                  where row.Field<string>("DELVCD") == strDeliveryCode
                                  select new
                                  {
                                      vIDX = row.Field<Int32>("IDX")
                                  };

                oMatrix1.SelectRow(obj_Deliver.Take(1).SingleOrDefault().vIDX +1, true, false);
                sFindTY = "F";

            }
            if (oForm.Settings.MatrixUID != pVal.ItemUID)
            {
                oForm.Freeze(true);
                oForm.Settings.MatrixUID = pVal.ItemUID;
                oMatrix.AutoResizeColumns();
                oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
                oMatrix.AutoResizeColumns();
                oForm.Freeze(false);
            }
        }
예제 #32
0
파일: picker.cs 프로젝트: ubaidmughal/SAP
        protected virtual void e_FormLoad(ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent)
        {
            try
            {
                if (pVal.BeforeAction == false && bLoadInputEvents)
                {
                    oform              = oApplication.Forms.Item(pVal.FormUID);
                    oform.ClientWidth  = 450;
                    oform.ClientHeight = 400;
                    dtSearch           = oform.DataSources.DataTables.Add("dtSearch");
                    // oform.Width = 600;
                    oform.Title = sTitle;


                    oform.State = BoFormStateEnum.fs_Maximized;
                    SAPbouiCOM.Item oItem;
                    IbtChoos     = oform.Items.Item("1");
                    IbtChoos.Top = 350;

                    btChoos          = (SAPbouiCOM.Button)IbtChoos.Specific;
                    btChoos.Caption  = "Choose";
                    ISearchField     = oform.Items.Item("2");
                    ISearchField.Top = 350;

                    SAPbouiCOM.Columns     oColumns;
                    SAPbouiCOM.DataColumns dtCols;
                    dtCols = dtSearch.Columns;
                    SAPbouiCOM.Column     oColumn;
                    SAPbouiCOM.DataColumn dtCol;
                    oItem         = oform.Items.Add("mtSearch", BoFormItemTypes.it_MATRIX);
                    oItem.Width   = 440;
                    oItem.Height  = 290;
                    oItem.Top     = 60;
                    oItem.Enabled = true;


                    mtSearch = (SAPbouiCOM.Matrix)oItem.Specific;

                    // mtSearch.
                    oItem      = oform.Items.Add("lbCritaria", BoFormItemTypes.it_STATIC);
                    oItem.Top  = 40;
                    oItem.Left = 10;

                    SAPbouiCOM.StaticText lblCri = (SAPbouiCOM.StaticText)oItem.Specific;

                    lblCri.Caption = "Find";

                    oItem       = oform.Items.Add("txCritaria", BoFormItemTypes.it_EDIT);
                    oItem.Top   = 40;
                    oItem.Width = 300;
                    oItem.Left  = 130;

                    //SAPbouiCOM.StaticText lblCri = oItem.Specific;



                    if (flgMultiple)
                    {
                    }
                    else
                    {
                        mtSearch.SelectionMode = BoMatrixSelect.ms_Single;
                    }
                    // mtSearch

                    oColumns = mtSearch.Columns;
                    //mtSearch.Layout = BoMatrixLayoutType.mlt_Vertical;
                    oColumn = oColumns.Add("vFix", SAPbouiCOM.BoFormItemTypes.it_EDIT);
                    // oColumn.Editable = false;
                    oColumn.Width = 40;
                    //oColumn.Visible = false;
                    int i = 0;
                    int j = 0;
                    foreach (System.Data.DataColumn cl in dtTable.Columns)
                    {
                        dtOut.Columns.Add(cl.ColumnName);
                        oColumn = oColumns.Add("v_" + i.ToString(), SAPbouiCOM.BoFormItemTypes.it_EDIT);
                        oColumn.TitleObject.Caption = cl.Caption;
                        oColumn.Width = 100;

                        oColumn.Editable = false;
                        dtCol            = dtCols.Add("cd" + i.ToString(), BoFieldsType.ft_AlphaNumeric);
                        oColumn.DataBind.Bind("dtSearch", "cd" + i.ToString());
                        // oColumn.
                        i++;
                        // col.DataBind.TableName = "dtSearch";
                        //col.DataBind
                    }
                    dtSearch.Rows.Clear();
                    i = 0;
                    j = 0;
                    foreach (DataRow dr in dtTable.Rows)
                    {
                        dtSearch.Rows.Add(1);
                        j = 0;
                        foreach (System.Data.DataColumn col in dtTable.Columns)
                        {
                            dtSearch.SetValue("cd" + j.ToString(), i, dr[j].ToString());
                            j++;
                        }
                        i++;
                    }
                    mtSearch.LoadFromDataSource();

                    oform = null;
                }
            }
            catch (Exception ex)
            {
                bLoadInputEvents = false;
            }
        }
예제 #33
0
파일: frm_JEP.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            //  dtHead = oForm.DataSources.DataTables.Item("dtHead");
            // dtHead.Rows.Add(1);

            dtPendingJEs.Columns.Add("DocDate");
            dtPendingJEs.Columns.Add("DocNum");
            dtPendingJEs.Columns.Add("DocTotal");
            dtPendingJEs.Columns.Add("Originator");

            oForm.Freeze(true);
            mtJE   = oForm.Items.Item("mtJE").Specific;
            mtDet  = oForm.Items.Item("mtDet").Specific;
            dtDet  = oForm.DataSources.DataTables.Item("dtDet");
            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            cbOr   = oForm.Items.Item("cbOr").Specific;
            IcbOr  = oForm.Items.Item("cbOr");
            cbOr.ValidValues.Add("All", "All");
            fillUserCb();

            oForm.DataSources.UserDataSources.Add("txDN", SAPbouiCOM.BoDataType.dt_LONG_NUMBER, 15); // Days of Month
            txDN  = oForm.Items.Item("txDN").Specific;
            ItxDN = oForm.Items.Item("txDN");
            txDN.DataBind.SetBound(true, "", "txDN");

            oForm.DataSources.UserDataSources.Add("txDD", SAPbouiCOM.BoDataType.dt_DATE); // Days of Month
            txDD  = oForm.Items.Item("txDD").Specific;
            ItxDD = oForm.Items.Item("txDD");
            txDD.DataBind.SetBound(true, "", "txDD");

            oForm.DataSources.UserDataSources.Add("txRem", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100); // Days of Month
            txRem  = oForm.Items.Item("txRem").Specific;
            ItxRem = oForm.Items.Item("txRem");
            txRem.DataBind.SetBound(true, "", "txRem");

            oForm.DataSources.UserDataSources.Add("txRef1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100); // Days of Month
            txRef1  = oForm.Items.Item("txRef1").Specific;
            ItxRef1 = oForm.Items.Item("txRef1");
            txRef1.DataBind.SetBound(true, "", "txRef1");

            oForm.DataSources.UserDataSources.Add("txRef2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 100);    // Days of Month
            txRef2  = oForm.Items.Item("txRef2").Specific;
            ItxRef2 = oForm.Items.Item("txRef2");
            txRef2.DataBind.SetBound(true, "", "txRef2");

            oForm.DataSources.UserDataSources.Add("txDS", SAPbouiCOM.BoDataType.dt_SUM);      // Days of Month
            txDS  = oForm.Items.Item("txDS").Specific;
            ItxDS = oForm.Items.Item("txDS");
            txDS.DataBind.SetBound(true, "", "txDS");


            oForm.DataSources.UserDataSources.Add("txCS", SAPbouiCOM.BoDataType.dt_SUM);      // Days of Month
            txCS  = oForm.Items.Item("txCS").Specific;
            ItxCS = oForm.Items.Item("txCS");
            txCS.DataBind.SetBound(true, "", "txCS");


            oForm.DataSources.UserDataSources.Add("chkPost", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1); // Days of Month
            chkPost  = oForm.Items.Item("chkPost").Specific;
            IchkPost = oForm.Items.Item("chkPost");
            chkPost.DataBind.SetBound(true, "", "chkPost");


            lnkBG    = oForm.Items.Item("lnkBG").Specific;
            IchkPost = oForm.Items.Item("lnkBG");
        }
        public new bool InitForm(string uid, string xmlPath, ref Application application, ref SAPbobsCOM.Company company, ref CSBOFunctions SBOFunctions, ref TGlobalVid _GlobalSettings)
        {
            Int32 i;
            //TFunctions Reg;
            bool Result = base.InitForm(uid, xmlPath, ref application, ref company, ref SBOFunctions, ref _GlobalSettings);

            try
            {
                oRecordSet = (SAPbobsCOM.Recordset)(FCmpny.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));

                Lista = new List <string>();

                FSBOf.LoadForm(xmlPath, "VID_FEPROCED.srf", uid);
                //EnableCrystal := true;
                oForm = FSBOApp.Forms.Item(uid);
                oForm.Freeze(true);
                oForm.AutoManaged    = true;
                oForm.SupportedModes = -1;             // afm_All

                //        VID_DelRow := true;
                //        VID_DelRowOK := true;

                //oForm.DataBrowser.BrowseBy := "Code";
                oDBDSH = oForm.DataSources.DBDataSources.Item("@VID_FEPROCED");

                // Ok Ad  Fnd Vw Rq Sec
                Lista.Add("mtx      , f,  t,  f,  f, r, 1");
                //Lista.Add('Name      , f,  t,  t,  f, r, 1');
                //Lista.Add('CardCode  , f,  t,  t,  f, r, 1');
                //FSBOf.SetAutoManaged(var oForm, Lista);

                //oCombo := ComboBox(oForm.Items.Item('TipDoc').Specific);
                //oCombo.ValidValues.Add('33', 'Factura');

                //s := '1';
                //oCombo.Select(s, BoSearchKey.psk_ByValue);

                //        AddChooseFromList();
                oMtx = (Matrix)(oForm.Items.Item("mtx").Specific);
                //        oColumn                    := SAPbouiCOM.Column(oMtx.Columns.Item('V_0'));
                //        oColumn.ChooseFromListUID  := 'CFL0';
                //        oColumn.ChooseFromListAlias:= 'Code';
                //        oMtx.AutoResizeColumns();


                if (GlobalSettings.RunningUnderSQLServer)
                {
                    s = @"select DocEntry, ISNULL(U_TipoDoc,'') TipoDoc, ISNULL(U_ProcNomE,'') ProcNomE, ISNULL(U_ProcNomD,'') ProcNomD, ISNULL(U_ProcNomR,'') ProcNomR, ISNULL(U_ProcNomC,'') ProcNomC, ISNULL(U_ProcNomDe,'') ProcNomDe, ISNULL(U_ProcNomL,'') ProcNomL, ISNULL(U_ProcNomS,'') ProcNomS, ISNULL(U_Habili,'Y') 'Habilitada', ISNULL(U_CantLineas,0) 'CantLineas' from [@VID_FEPROCED]";
                }
                else
                {
                    s = @"select ""DocEntry"", IFNULL(""U_TipoDoc"",'') ""TipoDoc"", IFNULL(""U_ProcNomE"",'') ""ProcNomE"", IFNULL(""U_ProcNomD"",'') ""ProcNomD"", IFNULL(""U_ProcNomR"",'') ""ProcNomR"", IFNULL(""U_ProcNomC"",'') ""ProcNomC"", IFNULL(""U_ProcNomDe"",'') ""ProcNomDe"", IFNULL(""U_ProcNomL"",'') ""ProcNomL"", IFNULL(""U_ProcNomS"",'') ""ProcNomS"", IFNULL(""U_Habili"",'Y') ""Habilitada"", IFNULL(""U_CantLineas"",0) ""CantLineas"" from ""@VID_FEPROCED"" ";
                }
                oRecordSet.DoQuery(s);

                i = 0;
                oDBDSH.Clear();
                while (!oRecordSet.EoF)
                {
                    oDBDSH.InsertRecord(i);
                    oDBDSH.SetValue("DocEntry", i, Convert.ToString((System.Int32)(oRecordSet.Fields.Item("DocEntry").Value)));
                    oDBDSH.SetValue("U_TipoDoc", i, (System.String)(oRecordSet.Fields.Item("TipoDoc").Value));
                    //oDBDSH.SetValue("U_TipoDocPE", i, (System.String)(oRecordSet.Fields.Item("TipoDocPE").Value));
                    oDBDSH.SetValue("U_ProcNomE", i, (System.String)(oRecordSet.Fields.Item("ProcNomE").Value));
                    oDBDSH.SetValue("U_ProcNomD", i, (System.String)(oRecordSet.Fields.Item("ProcNomD").Value));
                    oDBDSH.SetValue("U_ProcNomR", i, (System.String)(oRecordSet.Fields.Item("ProcNomR").Value));
                    oDBDSH.SetValue("U_ProcNomC", i, (System.String)(oRecordSet.Fields.Item("ProcNomC").Value));
                    //oDBDSH.SetValue("U_ProcNomDe", i, (System.String)(oRecordSet.Fields.Item("ProcNomDe").Value));
                    //oDBDSH.SetValue("U_ProcNomL", i, (System.String)(oRecordSet.Fields.Item("ProcNomL").Value));
                    //oDBDSH.SetValue("U_ProcNomS", i, (System.String)(oRecordSet.Fields.Item("ProcNomS").Value));
                    oDBDSH.SetValue("U_Habili", i, (System.String)(oRecordSet.Fields.Item("Habilitada").Value));
                    oDBDSH.SetValue("U_CantLineas", i, Convert.ToString((System.Int32)(oRecordSet.Fields.Item("CantLineas").Value)));
                    oRecordSet.MoveNext();
                    i++;
                }

                oDBDSH.InsertRecord(i);
                oDBDSH.SetValue("DocEntry", i, "");
                oDBDSH.SetValue("U_TipoDoc", i, "");
                //oDBDSH.SetValue("U_TipoDocPE", i, "");
                oDBDSH.SetValue("U_ProcNomE", i, "");
                oDBDSH.SetValue("U_ProcNomD", i, "");
                oDBDSH.SetValue("U_ProcNomR", i, "");
                oDBDSH.SetValue("U_ProcNomC", i, "");
                //oDBDSH.SetValue("U_ProcNomDe", i, "");
                //oDBDSH.SetValue("U_ProcNomL", i, "");
                //oDBDSH.SetValue("U_ProcNomS", i, "");
                oDBDSH.SetValue("U_Habili", i, "Y");
                oDBDSH.SetValue("U_CantLineas", i, "60");

                if (GlobalSettings.RunningUnderSQLServer) //TipoDoc
                {
                    s = @"select U1.FldValue 'Code', U1.Descr 'Name' from UFD1 U1 join CUFD U0 on U0.TableID = U1.TableID and U0.FieldID = U1.FieldID where U1.TableID = '@VID_FEPROCED' and U0.AliasID = '{0}'";
                }
                else
                {
                    s = @"select U1.""FldValue"" ""Code"", U1.""Descr"" ""Name"" from ""UFD1"" U1 join ""CUFD"" U0 on U0.""TableID"" = U1.""TableID"" and U0.""FieldID"" = U1.""FieldID"" where U1.""TableID"" = '@VID_FEPROCED' and U0.""AliasID"" = '{0}' ";
                }

                s = String.Format(s, "TipoDoc");
                oRecordSet.DoQuery(s);
                oColumn = (SAPbouiCOM.Column)(oMtx.Columns.Item("TipoDoc"));
                FSBOf.FillComboMtx(oColumn, ref oRecordSet, false);
                //((SAPbouiCOM.Column)oMtx.Columns.Item("TipoDocPE")).Visible = false;

                if (GlobalSettings.RunningUnderSQLServer) //Habilitado
                {
                    s = @"select FldValue 'Code', Descr 'Name' from UFD1 where TableID = '@VID_FEPROCED' and FieldID = 2";
                }
                else
                {
                    s = @"select ""FldValue"" ""Code"", ""Descr"" ""Name"" from ""UFD1"" where ""TableID"" = '@VID_FEPROCED' and ""FieldID"" = 2";
                }
                oRecordSet.DoQuery(s);
                oColumn = (SAPbouiCOM.Column)(oMtx.Columns.Item("Habili"));
                FSBOf.FillComboMtx(oColumn, ref oRecordSet, false);


                //EditText(oForm.Items.Item('CardCode').Specific).Active := True;
                oMtx.LoadFromDataSource();


                oForm.Mode = BoFormMode.fm_OK_MODE;
                oMtx.AutoResizeColumns();
            }
            catch (Exception e)
            {
                OutLog("InitForm: " + e.Message + " ** Trace: " + e.StackTrace);
                FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", "");
            }
            oForm.Freeze(false);
            return(Result);
        }//fin InitForm
예제 #35
0
        private int GetSelectedMatrixRowIndex(SAPbouiCOM.Form oForm)
        {
            int retValue = -1;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                retValue = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
            }
            catch (Exception)
            {

                throw;
            }
            return retValue;
        }
        public new bool InitForm(string uid, string xmlPath, ref Application application, ref SAPbobsCOM.Company company, ref CSBOFunctions SBOFunctions, ref TGlobalVid _GlobalSettings)
        {
            //SAPbouiCOM.ComboBox oComboBox;
            bool Result = base.InitForm(uid, xmlPath, ref application, ref company, ref SBOFunctions, ref _GlobalSettings);

            try
            {
                oRecordSet = (SAPbobsCOM.Recordset)(FCmpny.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset));

                Lista = new List <string>();

                FSBOf.LoadForm(xmlPath, "VID_FEDIST.srf", uid);
                //EnableCrystal := true;
                oForm = FSBOApp.Forms.Item(uid);
                oForm.Freeze(true);
                oForm.AutoManaged    = true;
                oForm.SupportedModes = -1;             // afm_All

                VID_DelRow   = false;
                VID_DelRowOK = false;

                oForm.DataBrowser.BrowseBy = "DocEntry";
                oDBDSH = oForm.DataSources.DBDataSources.Item("@VID_FEDIST");
                oDBDSD = oForm.DataSources.DBDataSources.Item("@VID_FEDISTD");

                oForm.EnableMenu("1282", false); // boton Crear

                // Ok Ad  Fnd Vw Rq Sec
                Lista.Add("DocEntry  , f,  f,  f,  f, r, 1");
                Lista.Add("Desde     , f,  t,  f,  f, r, 1");
                Lista.Add("Hasta     , f,  t,  f,  f, r, 1");
                Lista.Add("Hasta     , f,  t,  f,  f, r, 1");
                Lista.Add("Sucursal  , f,  t,  f,  f, r, 1");
                Lista.Add("RangoF    , f,  t,  t,  f, r, 1");
                Lista.Add("TipoDoc   , f,  t,  t,  f, r, 1");
                Lista.Add("btnDist   , f,  t,  f,  f, n, 1");
                FSBOf.SetAutoManaged(oForm, Lista);

                //carga tipo documentos
                if (GlobalSettings.RunningUnderSQLServer)
                {
                    s = @"select distinct U_TipoDoc 'Code', U_TipoDoc 'Name' from [@VID_FECAF]";
                }
                else
                {
                    s = @"select distinct ""U_TipoDoc"" ""Code"", ""U_TipoDoc"" ""Name"" from ""@VID_FECAF"" ";
                }
                oRecordSet.DoQuery(s);
                FSBOf.FillCombo((ComboBox)(oForm.Items.Item("TipoDoc").Specific), ref oRecordSet, true);

                //carga sucursales
                if (GlobalSettings.RunningUnderSQLServer)
                {
                    s = "select Code, Name from [@VID_FESUC]";
                }
                else
                {
                    s = @"select ""Code"", ""Name"" from ""@VID_FESUC"" ";
                }
                oRecordSet.DoQuery(s);
                FSBOf.FillCombo((ComboBox)(oForm.Items.Item("Sucursal").Specific), ref oRecordSet, true);

                //        AddChooseFromList();
                oMtx = (Matrix)(oForm.Items.Item("mtx").Specific);
                //        oColumn                    := SAPbouiCOM.Column(oMtx.Columns.Item('V_0'));
                //        oColumn.ChooseFromListUID  := 'CFL0';
                //        oColumn.ChooseFromListAlias:= 'Code';

                if (GlobalSettings.RunningUnderSQLServer)
                {
                    s = @"select C1.FldValue 'Code', C1.Descr 'Name'
                           from CUFD C0
                           join UFD1 C1 on C1.TableID = C0.TableID
                                       and C1.FieldID = C0.FieldID
                          where C0.TableID = '@VID_FEDISTD'
                            and C0.AliasID = 'Estado'";
                }
                else
                {
                    s = @"select C1.""FldValue"" ""Code"", C1.""Descr"" ""Name""
                           from ""CUFD"" C0
                           join ""UFD1"" C1 on C1.""TableID"" = C0.""TableID""
                                       and C1.""FieldID"" = C0.""FieldID""
                          where C0.""TableID"" = '@VID_FEDISTD'
                            and C0.""AliasID"" = 'Estado' ";
                }
                oRecordSet.DoQuery(s);
                oColumn = (SAPbouiCOM.Column)(oMtx.Columns.Item("Estado"));
                FSBOf.FillComboMtx(oColumn, ref oRecordSet, false);

                oDBDSD.InsertRecord(0);
                oMtx.LoadFromDataSource();
                oMtx.AutoResizeColumns();

                //EditText(oForm.Items.Item('CardCode').Specific).Active := True;
                oForm.Mode = BoFormMode.fm_OK_MODE;
            }
            catch (Exception e)
            {
                OutLog("InitForm: " + e.Message + " ** Trace: " + e.StackTrace);
                FSBOApp.MessageBox(e.Message + " ** Trace: " + e.StackTrace, 1, "Ok", "", "");
            }
            oForm.Freeze(false);

            return(Result);
        }//fin InitForm
예제 #37
0
        public virtual void ET_mtx1_DUMY_AFKeyDown(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            try
            {
                KIS_SO0000F_HRD KIS_SO0000F_HRD = new KIS_SO0000F_HRD();
                switch (pVal.ColUID)
                {
                    case "U_ADDR1":
                        if (pVal.CharPressed == 9 && FN.GetMatirxCellValue(ref oMatrix, pVal.ColUID, pVal.Row) == "")
                            KIS_SO0000F_HRD.Act0_SubFormInit("DTL_지번주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Numberoflot, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
                        break;
                    case "U_ADDR2":
                        if (pVal.CharPressed == 9 && FN.GetMatirxCellValue(ref oMatrix, pVal.ColUID, pVal.Row) == "")
                            KIS_SO0000F_HRD.Act0_SubFormInit("DTL_거리주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Road, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
                        break;
                    default:
                        break;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
예제 #38
0
        /// <summary>
        /// Asigna los numero de serie correspondientes a cada artículo
        /// </summary>
        /// <param name="_oForm">Forma activa</param>
        private void AsignarNumerosDeSeries(Form _oForm)
        {
            try
            {
                _oMatrixSerieArticulos = _oForm.Items.Item(GRID_ARTICULOS_SERIE).Specific;
                _oMatrixSerieDefinir   = _oForm.Items.Item(GRID_SERIE_DEFINIR).Specific;
                List <string> mensajes        = new List <string>();
                List <string> solicitudes     = new List <string>();
                bool          seEncontroSerie = false;

                for (int noLinea = 1; noLinea <= _oMatrixSerieArticulos.RowCount; noLinea++)
                {
                    ProcesoActivo = true;
                    _oForm.Freeze(false);
                    seEncontroSerie = false;

                    _oClaveArticulo      = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_CLAVE_ARTICULO).Cells.Item(noLinea).Specific;
                    _oTotalSeleccionados = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_TOTAL_SELECCIONADO).Cells.Item(noLinea).Specific;

                    var serieI = from p in lDatosTransferenciaStock
                                 where p.itemCode == _oClaveArticulo.Value.ToString() && p.noLinea == noLinea
                                 select p.serieInial;
                    var serieF = from p in lDatosTransferenciaStock
                                 where p.itemCode == _oClaveArticulo.Value.ToString() && p.noLinea == noLinea
                                 select p.serieFinal;

                    int x = 1;

                    string PrefijoSerie         = serieI.ElementAt(0).ToString().Substring(0, 6);
                    int    serieInicial         = Convert.ToInt32(serieI.ElementAt(0).ToString().Substring(6));
                    int    serieFinal           = Convert.ToInt32(serieF.ElementAt(0).ToString().Substring(6));
                    int    totalSeries          = (serieFinal - serieInicial) + 1;
                    int    longitudSerieInicial = serieI.ElementAt(0).ToString().Substring(6).Length;
                    int    longitudSerieFinal   = serieF.ElementAt(0).ToString().Substring(6).Length;

                    if (_oTotalSeleccionados.Value == "0.0")
                    {
                        _oForm.Freeze(false);
                        _oTxtFiltro = _oForm.Items.Item(CAMPO_FILTRO).Specific;

                        if (serieInicial == serieFinal)
                        {
                            if (serieInicial.ToString().Length < longitudSerieInicial)
                            {
                                _oTxtFiltro.Value = PrefijoSerie + serieInicial.ToString().PadLeft(longitudSerieInicial, '0'); // +"0" + serieInicial;
                            }
                            else
                            {
                                _oTxtFiltro.Value = PrefijoSerie + serieInicial;
                            }
                        }
                        else
                        {
                            for (int i = 0; i < serieI.ElementAt(0).ToString().Length; i++)
                            {
                                if (serieI.ElementAt(0).ToString().Substring(i, 1) != serieF.ElementAt(0).ToString().Substring(i, 1))
                                {
                                    _oTxtFiltro.Value = serieI.ElementAt(0).ToString().Substring(0, i);
                                    break;
                                }
                            }
                            //_oTxtFiltro.Value = PrefijoSerie;
                        }

                        string SerFinal = null;
                        if (serieFinal.ToString().Length < longitudSerieFinal)
                        {
                            SerFinal = PrefijoSerie + serieFinal.ToString().PadLeft(longitudSerieFinal, '0'); // +"0" + serieFinal;
                        }
                        else
                        {
                            SerFinal = PrefijoSerie + serieFinal;
                        }

                        //Presionar de forma automática tabulación para que el sistema realice la búsqueda
                        _Application.SendKeys("{TAB}");
                        _oForm.Select();
                        if (_oMatrixSerieDefinir.RowCount != 0)
                        {
                            _oForm.Freeze(true);
                            _oMatrixSerieDefinir.Columns.Item("19").TitleObject.Click(BoCellClickType.ct_Regular, 4096);
                            _oMatrixSerieDefinir.Columns.Item("19").TitleObject.Click(BoCellClickType.ct_Double);
                            _oForm.Select();
                            // oProgBar = _Application.StatusBar.CreateProgressBar("Seleccionando series del articulo: " + _oClaveArticulo.Value.ToString(), totalSeries, false);
                            _Application.StatusBar.SetText("Buscando series por favor espere....", BoMessageTime.bmt_Long, BoStatusBarMessageType.smt_Warning);
                            for (int noLineaSerie = 1; noLineaSerie <= _oMatrixSerieDefinir.RowCount; noLineaSerie++)
                            {
                                _oForm.Select();
                                if (seEncontroSerie == false)
                                {
                                    _Application.StatusBar.SetText("Buscando series por favor espere...." + noLineaSerie + " de " + _oMatrixSerieDefinir.RowCount.ToString(), BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning);
                                }
                                //Realiza la función de mantener presionado CTRL y seleccionar cada fila para asignar la serie.
                                SAPbouiCOM.EditText SerieSeleccionada = _oMatrixSerieDefinir.Columns.Item(COLUMNA_NUMERO_SERIE).Cells.Item(noLineaSerie).Specific;

                                try
                                {
                                    if (SerFinal != SerieSeleccionada.Value.ToString())
                                    {
                                        if ((serieInicial.ToString().Length < longitudSerieInicial ?
                                             PrefijoSerie + serieInicial.ToString().PadLeft(longitudSerieInicial, '0') : // "0" + serieInicial.ToString() :
                                             PrefijoSerie + serieInicial.ToString()) == SerieSeleccionada.Value.ToString())
                                        {
                                            //  oProgBar.Text = "Seleccionando serie " + _oClaveArticulo.Value.ToString() + " : " + x + " de " + totalSeries;
                                            _Application.StatusBar.SetText("Seleccionando serie " + _oClaveArticulo.Value.ToString() + " : " + x + " de " + totalSeries,
                                                                           BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Warning);
                                            seEncontroSerie = true;
                                            _oMatrixSerieDefinir.Columns.Item(0).Cells.Item(noLineaSerie).Click(BoCellClickType.ct_Regular, 4096);
                                            x            += 1;
                                            serieInicial += 1;
                                            //oProgBar.Value += 1;
                                        }
                                    }
                                    else
                                    {
                                        //x += 1;
                                        //oProgBar.Text = "Seleccionando serie " + _oClaveArticulo.Value.ToString() + " : " + x + " de " + totalSeries;
                                        _Application.StatusBar.SetText("Seleccionando serie " + _oClaveArticulo.Value.ToString() + " : " + x + " de " + totalSeries,
                                                                       BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Success);
                                        _oMatrixSerieDefinir.Columns.Item(0).Cells.Item(noLineaSerie).Click(BoCellClickType.ct_Regular, 4096);
                                        break;
                                    }
                                }
                                catch (Exception)
                                {
                                    solicitudes.Add(SerFinal);
                                }
                            }
                            _oForm.Select();
                            // oProgBar.Stop();
                            int selRow = _oMatrixSerieDefinir.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);

                            if (selRow != -1)
                            {
                                _oForm.Items.Item(BTN_ASIGNAR_SERIE).Click();
                                _oForm.Items.Item(BTN_ACTUALIZAR).Click();
                            }

                            if (noLinea < _oMatrixSerieArticulos.RowCount)
                            {
                                _oMatrixSerieArticulos.Columns.Item(COLUMNA_NIVEL_LINEA_ARTICULO).Cells.Item(noLinea + 1).Click(BoCellClickType.ct_Regular, 4096);
                            }
                            _oForm.Select();
                            _oTotalSeleccionados = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_TOTAL_SELECCIONADO).Cells.Item(noLinea).Specific;
                            _oCantidad           = (SAPbouiCOM.EditText)_oMatrixSerieArticulos.Columns.Item(COLUMNA_CANTIDAD).Cells.Item(noLinea).Specific;

                            if (_oTotalSeleccionados.Value != _oCantidad.Value)
                            {
                                solicitudes.Add(SerFinal);
                                mensajes.Add("No se encontraron algunas series, favor de verificar");
                            }
                        }
                        else
                        {
                            solicitudes.Add(SerFinal);
                            mensajes.Add("No se encontraron algunas series, favor de verificar");
                        }
                    }
                }
                lDatosTransferenciaStock.Clear();
                if (mensajes.Count() != 0)
                {
                    var    listaSolicitudes = string.Join(", ", solicitudes.Select(s => s.ToString()));
                    string mostrar          = mensajes[0] + Environment.NewLine + listaSolicitudes;
                    _Application.MessageBox(mostrar);
                }
                else
                {
                    _Application.MessageBox("Se agregaron las series correctamente.");
                }
            }
            catch (Exception ex)
            {
                //oProgBar.Stop();
                throw new Exception("Error al asignar números de serie *AsignarNumerosDeSeries* : " + ex.Message);
            }
            finally
            {
                _oForm.Freeze(false);
            }
        }
예제 #39
0
        public static void clsSupplierPurchaseHistory_ItemEvent(ref SAPbouiCOM.Application oApplication, ref SAPbobsCOM.Company oCompany, SAPbouiCOM.Form oSetupForm, ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent)
        {
            if (oForm != null)
            {
                oForm = oSetupForm;
                SAPbouiCOM.Grid oGrid;
                oGrid   = (SAPbouiCOM.Grid)oForm.Items.Item("4").Specific;
                oMatrix = (SAPbouiCOM.Matrix)oSOForm.Items.Item("38").Specific;
                if (pVal.BeforeAction)
                {
                    switch (pVal.EventType)
                    {
                    //case BoEventTypes.et_FORM_CLOSE:
                    //    BubbleEvent = false;
                    //    oForm.Visible = false;
                    //    break;

                    case BoEventTypes.et_DOUBLE_CLICK:
                        if (pVal.ItemUID == "4")
                        {
                            string strSelCol = "";
                            strSelCol = oGrid.Columns.Item(pVal.ColUID).TitleObject.Caption.ToString();
                            string[] words = strSelCol.Split('-');
                            string[] words1;
                            if (words.Length == 2)
                            {
                                oForm.Freeze(true);
                                for (int i = 0; i < oGrid.Rows.Count; i++)
                                {
                                    if (oGrid.DataTable.GetValue(strSelCol, i).ToString().Trim() != "")
                                    {
                                        if (oGrid.DataTable.GetValue(strSelCol, i).ToString().Trim() != "0")
                                        {
                                            words1 = oGrid.DataTable.GetValue(strSelCol, i).ToString().Trim().Split(' ');
                                            if (words1[0].Trim() != "")
                                            {
                                                oGrid.DataTable.SetValue("Order Qty", i, words1[0].Trim());
                                            }
                                        }
                                    }
                                }
                                oForm.Freeze(false);
                            }
                        }
                        break;

                    case BoEventTypes.et_ITEM_PRESSED:
                        if (pVal.ItemUID == "2")
                        {
                            BubbleEvent   = false;
                            oForm.Visible = false;
                        }
                        if (pVal.ItemUID == "3")
                        {
                            flushAll();
                            BubbleEvent   = false;
                            oForm.Visible = false;
                            return;

                            oMatrix.Clear();
                            int j = oMatrix.RowCount;
                            if (j == 0)
                            {
                                oMatrix.AddRow(1, -1);
                            }
                            j = oMatrix.RowCount;

                            for (int i = 0; i < oGrid.Rows.Count; i++)
                            {
                                if (oGrid.DataTable.GetValue("Order Qty", i).ToString().Trim() != "")
                                {
                                    if (oGrid.DataTable.GetValue("Order Qty", i).ToString().Trim() != "0")
                                    {
                                        string strItemCode = oGrid.DataTable.GetValue("ItemCode", i).ToString().Trim();
                                        string strQty      = oGrid.DataTable.GetValue("Order Qty", i).ToString().Trim();
                                        string strPrice    = oGrid.DataTable.GetValue("Current Purchase Price", i).ToString().Trim();
                                        string strUoM      = oGrid.DataTable.GetValue("UoM", i).ToString().Trim();
                                        try
                                        {
                                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("1").Cells.Item(j).Specific).Value  = strItemCode;
                                            ((SAPbouiCOM.EditText)oMatrix.Columns.Item("11").Cells.Item(j).Specific).Value = strQty;
                                            try
                                            {
                                                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("1470002145").Cells.Item(j).Specific).Value = strUoM;
                                            }
                                            catch (Exception)
                                            {
                                            }
                                            try
                                            {
                                                ((SAPbouiCOM.EditText)oMatrix.Columns.Item("14").Cells.Item(j).Specific).Value = strPrice;
                                            }
                                            catch (Exception)
                                            {
                                            }
                                            j++;
                                        }
                                        catch (Exception)
                                        {
                                            j++;
                                        }
                                    }
                                }
                            }

                            //oForm.Close();
                            oForm.Visible = false;
                        }
                        break;

                    case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST:
                        if (pVal.ItemUID == "4")
                        {
                            if (pVal.ColUID == "UoM")
                            {
                                if (oGrid.DataTable.GetValue("ItemCode", pVal.Row).ToString().Trim() != "")
                                {
                                    string squery = "Select T2.\"UomCode\",T2.\"UomName\" From OITM T0 Inner Join UGP1 T1 On T0.\"UgpEntry\" = T1.\"UgpEntry\" Inner Join OUOM T2 On T1.\"UomEntry\" = T2.\"UomEntry\" Where T0.\"ItemCode\" = '" + oGrid.DataTable.GetValue("ItemCode", pVal.Row).ToString().Trim() + "'";
                                    Utilities.UtilitiesCls.CFLConditionQuery(ref oApplication, ref oCompany, oForm, ref pVal, squery, "UomCode", "10010198", "UomCode", false, true, "4", "UoM", false);
                                }
                            }
                            if (pVal.ColUID == "ItemCode")
                            {
                                SAPbouiCOM.ChooseFromListCollection oCFLs = null;
                                SAPbouiCOM.Conditions oCons = null;
                                SAPbouiCOM.Condition  oCon  = null;
                                oCFLs = oForm.ChooseFromLists;
                                SAPbouiCOM.ChooseFromList oCFL = null;
                                oCFL = oCFLs.Item("CFL_2");

                                oCons = new Conditions();
                                oCFL.SetConditions(oCons);


                                oCons = oCFL.GetConditions();



                                oCon           = oCons.Add();
                                oCon.Alias     = "PrchseItem";
                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                                oCon.CondVal   = "Y";

                                oCon.Relationship = BoConditionRelationship.cr_AND;
                                oCon           = oCons.Add();
                                oCon.Alias     = "frozenFor";
                                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL;
                                oCon.CondVal   = "Y";


                                int intCnt = 2;
                                for (int i = 0; i < oGrid.Rows.Count; i++)
                                {
                                    if (oGrid.DataTable.GetValue("ItemCode", i).ToString().Trim() != "")
                                    {
                                        if (intCnt > 0)
                                        {
                                            oCon.Relationship = BoConditionRelationship.cr_AND;
                                        }
                                        oCon           = oCons.Add();
                                        oCon.Alias     = "ItemCode";
                                        oCon.Operation = SAPbouiCOM.BoConditionOperation.co_NOT_EQUAL;
                                        oCon.CondVal   = oGrid.DataTable.GetValue("ItemCode", i).ToString().Trim();
                                        intCnt        += 1;
                                    }
                                }

                                oCFL.SetConditions(oCons);
                            }
                        }
                        break;

                    default:
                        break;
                    }
                }
                else if (pVal.BeforeAction == false)
                {
                    switch (pVal.EventType)
                    {
                    case BoEventTypes.et_ITEM_PRESSED:
                        break;

                    case SAPbouiCOM.BoEventTypes.et_CHOOSE_FROM_LIST:
                        if (oForm.Mode != SAPbouiCOM.BoFormMode.fm_FIND_MODE)
                        {
                            if (pVal.ItemUID == "4")
                            {
                                if (pVal.ColUID == "ItemCode")
                                {
                                    oRecordSet = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                                    string strQry      = "";
                                    string strItemCode = "";
                                    oDataTable = UtilitiesCls.DataTable(ref oApplication, ref oCompany, oForm, ref pVal);
                                    if (oDataTable != null)
                                    {
                                        strItemCode = oDataTable.GetValue("ItemCode", 0).ToString();
                                    }
                                    if (strItemCode != "")
                                    {
                                        strQry = " Exec EJ_LoadBPItemDetails '" + ((SAPbouiCOM.EditText)oForm.Items.Item("6").Specific).Value.Trim() + "', '" + strItemCode + "'";
                                        oRecordSet.DoQuery(strQry);
                                        if (!oRecordSet.EoF)
                                        {
                                            oGrid.DataTable.SetValue("ItemCode", pVal.Row, strItemCode);
                                            oGrid.DataTable.SetValue("ItemName", pVal.Row, oRecordSet.Fields.Item("ItemName").Value.ToString());
                                            oGrid.DataTable.SetValue("Order Qty", pVal.Row, "");
                                            oGrid.DataTable.SetValue("UoM", pVal.Row, oRecordSet.Fields.Item("UoM").Value.ToString());
                                            oGrid.DataTable.SetValue("Current Purchase Price", pVal.Row, oRecordSet.Fields.Item("Current Price").Value.ToString());
                                        }
                                    }

                                    oGrid.DataTable.SetValue("ItemCode", pVal.Row, strItemCode);
                                    int j = oGrid.Rows.Count;
                                    if (j == oGrid.Rows.Count)
                                    {
                                        oGrid.DataTable.Rows.Add();
                                    }
                                }

                                if (pVal.ColUID == "UoM")
                                {
                                    oRecordSet = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                                    string strUoMCode = "";
                                    oDataTable = UtilitiesCls.DataTable(ref oApplication, ref oCompany, oForm, ref pVal);
                                    if (oDataTable != null)
                                    {
                                        strUoMCode = oDataTable.GetValue("UomCode", 0).ToString();
                                    }
                                    oGrid.DataTable.SetValue("UoM", pVal.Row, strUoMCode);
                                    string strQry = " Exec EJ_LoadUoMPrice '" + ((SAPbouiCOM.EditText)oForm.Items.Item("6").Specific).Value.Trim() + "','" + oGrid.DataTable.GetValue("ItemCode", pVal.Row).ToString().Trim() + "' ,'" + strUoMCode + "'";
                                    oRecordSet.DoQuery(strQry);
                                    if (!oRecordSet.EoF)
                                    {
                                        oGrid.DataTable.SetValue("Current Purchase Price", pVal.Row, oRecordSet.Fields.Item("Current Price").Value.ToString());
                                    }
                                }
                            }
                        }
                        break;

                    case BoEventTypes.et_COMBO_SELECT:

                        break;

                    case BoEventTypes.et_FORM_CLOSE:
                        oForm = null;
                        break;

                    default:
                        break;
                    }
                }
            }
        }
예제 #40
0
        private bool DataToDbDataSource_CALL(SAPbouiCOM.Form oForm)
        {
            bool rtnValue = false;
            try
            {
                oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;

                /*
                // 1. 메트릭스 삭제대상 삭제 적용
                var objDelete = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "D"
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX") + 1
                                };

                foreach (var itemSub in objDelete)
                {
                    //삭제할것들 선택한다.
                    oMatrix.SelectRow(itemSub.vIDX, true, true);
                }

                // 선택된 Rows를 삭제한다.
                int iSelectIdx = 0;

                while (iSelectIdx != -1)
                {
                    iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                    if (iSelectIdx != -1)
                        oMatrix.DeleteRow(iSelectIdx);
                }
                if (objDelete.Count() > 0)
                    oMatrix.FlushToDataSource();

                 * */

                var objModify = from row in gDs.Tables[oForm.UniqueID + "_Call"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "M" || row.Field<string>("ROWSTATE") == "I"
                                orderby row.Field<Int32>("IDX") descending                         
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX")
                                    ,
                                    vDELVCD = row.Field<string>("DELVCD")
                                    ,
                                    vCALLTP = row.Field<string>("CALLTP")
                                    ,
                                    vMEMO = row.Field<string>("MEMO")
                                    ,
                                    vRECVID = row.Field<string>("RECVID")
                                    ,
                                    vRECVNM = row.Field<string>("RECVNM")
                                    ,
                                    vRECVDT = row.Field<string>("RECVDT")
                                    ,
                                    vRECVTI = row.Field<string>("RECVTI")
                                    ,
                                    vPROCID = row.Field<string>("PROCID")
                                    ,
                                    vPROCNM = row.Field<string>("PROCNM")
                                    ,
                                    vPROCDT = row.Field<string>("PROCDT")
                                    ,
                                    vPROSTAT = row.Field<string>("PROSTAT")
                                    ,
                                    vROWSTATE = row.Field<string>("ROWSTATE")

                                };

                foreach (var itemSub in objModify)
                {

                    if (itemSub.vROWSTATE == "I")
                        SetDbDataSourceAddRow(ref oForm, ref oMatrix, ref oDB2_O, "U_DELVCD");

                    oDB2_O.SetValue("U_DELVCD", itemSub.vIDX, itemSub.vDELVCD);
                    oDB2_O.SetValue("U_CALLTP", itemSub.vIDX, itemSub.vCALLTP);
                    oDB2_O.SetValue("U_MEMO", itemSub.vIDX, itemSub.vMEMO);
                    oDB2_O.SetValue("U_RECVID", itemSub.vIDX, itemSub.vRECVID);
                    oDB2_O.SetValue("U_RECVNM", itemSub.vIDX, itemSub.vRECVNM);
                    oDB2_O.SetValue("U_RECVDT", itemSub.vIDX, itemSub.vRECVDT);
                    oDB2_O.SetValue("U_RECVTI", itemSub.vIDX, itemSub.vRECVTI);
                    oDB2_O.SetValue("U_PROCID", itemSub.vIDX, itemSub.vPROCID);
                    oDB2_O.SetValue("U_PROCNM", itemSub.vIDX, itemSub.vPROCNM);
                    oDB2_O.SetValue("U_PROCDT", itemSub.vIDX, itemSub.vPROCDT);
                    oDB2_O.SetValue("U_PROSTAT", itemSub.vIDX, itemSub.vPROSTAT);

                }
                if (objModify.Count() > 0)
                    oMatrix.LoadFromDataSource();

                rtnValue = true;
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }
예제 #41
0
        public virtual bool ET_BFRowDataMenu_Delete(MenuEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.ActiveForm;
            // ADD YOUR ACTION CODE HERE ...

            try
            {



                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific;
                string strIndex = FN.GetMatirxCellValue(ref oMatrix, "U_IDX", gRowIdx);
                //string strLineID = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[int.Parse(strIndex)]["LINEID"].ToString();
                string strDeliveryCode = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", gRowIdx);
                int idx = int.Parse(strIndex);

                if (gSelMtx == "mtx1_DUMY")
                {
                    //// 메인삭제전 상담이력을 삭제한다.
                    if (DeleteMatrixRows_CALL(strDeliveryCode))
                    {
                        // 1. DataTable 에서 행삭제
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.RemoveAt(idx);

                        oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
                        if (oMatrix.VisualRowCount > idx)
                        {

                            //ExportDataSetToFiles();
                            // 화면단에서 행추가한건에대해서 원본메트릭스에서 삭제하지 않는다.

                            // 2. 원본 데이터 삭제
                            oMatrix.DeleteRow(idx + 1);
                            oMatrix.FlushToDataSource();

                        }

                        // 3. 구독부수 재계산하고 적용한다.
                        SetSumNumberOfCofies(oForm);
                    }
                    else
                        return false;
                }
                else
                {
                    oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;

                    // 1. DataTable 에서 행삭제
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows.RemoveAt(idx);
                    if (oMatrix.VisualRowCount > idx)
                    {
                        // 2. 원본 데이터 삭제
                        oMatrix.DeleteRow(idx + 1);
                        oMatrix.FlushToDataSource();
                    }
                }
            }
            catch (Exception)
            {
                throw;
            }
            return true;
        }
예제 #42
0
        private void SetDeliveryDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
        {
            string strValue = string.Empty;
            string strIDX = string.Empty;
            string strRowStat = string.Empty;
            StringBuilder sb = null;

            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                //oMatrix.FlushToDataSource();

                int idx = GetDataTableIndexByMatrix(oMatrix, pRowID);

                strRowStat = gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"].ToString(); //Row상태값

                switch (pColID)
                {
                    case "U_DELVCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVCD"] = strValue;
                        break;

                    case "U_RDEPT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RDEPT", pRowID); //부서  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["RDEPT"] = strValue;
                        break;

                    case "U_PAPERTP":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pRowID); //지종      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAPERTP"] = strValue;
                        break;

                    case "U_READTP":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_READTP", pRowID); //독자구분      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["READTP"] = strValue;
                        break;

                    case "U_PAYCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pRowID); //요금제코드
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PAYNM", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = "";
                        }
                        break;

                    case "U_PAYNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYNM", pRowID); //요금제명  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["PAYNM"] = strValue;
                        break;

                    case "U_TEL":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_TEL", pRowID); //연락처  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["TEL"] = strValue;
                        break;

                    case "U_MOBILE":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MOBILE", pRowID); //휴대폰  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["MOBILE"] = strValue;
                        break;

                    case "U_ADDR1":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1", pRowID); //주소1    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1"] = strValue;
                        break;

                    case "U_ADDR2":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2", pRowID); //주소2     
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2"] = strValue;
                        break;

                    case "U_ADDR1_D":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR1_D", pRowID); //주소1    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR1_D"] = strValue;
                        break;

                    case "U_ADDR2_D":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_ADDR2_D", pRowID); //주소2     
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ADDR2_D"] = strValue;
                        break;

                    case "U_CENTCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTCD", pRowID); //지국      
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CENTNM", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = "";
                        }

                        break;

                    case "U_CENTNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CENTNM", pRowID); //지국명    
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CENTNM"] = strValue;
                        break;

                    case "U_DELVFR":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVFR", pRowID); //배달시작일
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVFR"] = strValue;

                        string strPAPERTP = FN.GetMatirxCellValue(ref oMatrix, "U_PAPERTP", pRowID);
                        if (strPAPERTP == "UJH")
                        {
                            string strPAYCD = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pRowID); //요금제코드

                            sb = new StringBuilder();
                            sb.AppendLine(" SELECT CONVERT (NVARCHAR (10)                            ");
                            sb.AppendLine("               , DATEADD (MM                              ");
                            sb.AppendLine("                        , (SELECT CONVERT (INT, U_TERM)   ");
                            sb.AppendLine("                             FROM [@KIS_SO0050M_HRD]      ");
                            sb.AppendLine("                            WHERE Code = '{0}')           ");
                            sb.AppendLine("                        , CONVERT (DATE, '{1}'))          ");
                            sb.AppendLine("               , 112)                                     ");

                            string strDELVTO = FN.GetRecordsetValue(string.Format(sb.ToString(), strPAYCD, strValue));
                            oMatrix.SetCellWithoutValidation(pRowID, "U_DELVTO", strDELVTO);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = strDELVTO;
                        }

                        break;

                    case "U_DELVTO":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVTO", pRowID); //배달종료일
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVTO"] = strValue;
                        break;

                    case "U_DELVCNT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCNT", pRowID); //배달부수 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["DELVCNT"] = strValue;

                        // 마스터의 구독부수를 갱신한다.
                        SetSumNumberOfCofies(oForm);
                        break;

                    case "U_METHOD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_METHOD", pRowID); //가입방법  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["METHOD"] = strValue;
                        break;

                    case "U_SAILCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SAILCD", pRowID); //유치자 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILCD"] = strValue;

                        if (string.IsNullOrEmpty(strValue))
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_SAILNM", "");
                            oMatrix.SetCellWithoutValidation(pRowID, "U_SDEPT", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = "";
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = "";
                        }

                        break;

                    case "U_SAILNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SAILNM", pRowID); //유치자 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SAILNM"] = strValue;
                        break;

                    case "U_STATUS":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_STATUS", pRowID); //배달상태  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["STATUS"] = strValue;

                        string strNowDate = B1Connections.theAppl.Company.ServerDate;

                        // 1.배달상태를 정상으로 바꾸면 중지일자를 Null로 바꾼다.
                        // 2.배달상태를 중지로 바꾸면 중지일자에 현재일자를 넣는다.
                        if (strValue == "UO")
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CLOSEDT", "");
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = "";
                        }

                        else if (strValue == "US")
                        {
                            oMatrix.SetCellWithoutValidation(pRowID, "U_CLOSEDT", strNowDate);
                            gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = FN.SetDateFormatToDB(strNowDate, FN.eDateType.n_YYYYMMDD);
                        }

                        // 마스터의 구독부수를 갱신한다.
                        SetSumNumberOfCofies(oForm);

                        break;

                    case "U_SDEPT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_SDEPT", pRowID); //배달상태 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["SDEPT"] = strValue;
                        break;

                    case "U_NOTE":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_NOTE", pRowID); //배달상세  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["NOTE"] = strValue;
                        break;

                    case "U_JOINDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_JOINDT", pRowID); //가입일자  
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["JOINDT"] = strValue;
                        break;

                    case "U_CLOSEDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CLOSEDT", pRowID); //해지일자
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["CLOSEDT"] = strValue;
                        break;

                    default:
                        break;
                }
                if (string.IsNullOrEmpty(strRowStat))
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows[idx]["ROWSTATE"] = "M";

            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #43
0
        public virtual void ET_AFRowDataMenu_Delete(MenuEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.ActiveForm;
            // ADD YOUR ACTION CODE HERE ...

            try
            {

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item(gSelMtx).Specific;
                oForm.Freeze(true);


                oMatrix.AddRow(1, -1);
                int i = oMatrix.VisualRowCount;
                oMatrix.DeleteRow(i);
                oMatrix.FlushToDataSource();




                if (gSelMtx == "mtx1_DUMY")
                {
                    gDeliverySelect = -1;
                    // 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다.
                    SetDataTableReIndexing_Deliver();

                    // 2. 다시 DataTable 기준으로 화면에 조회한다.
                    FindData(oForm);
                }
                else
                {
                    // 1. 삭제된뒤 DataTable의 Index값을 다시 설정한다.
                    SetDataTableReIndexing_Call();

                    // 2. 다시 DataTable 기준으로 화면에 조회한다.
                    FindSubData(oForm, GetSelectedMatrixRowIndex(oForm));
                }

                oForm.Freeze(false);
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #44
0
        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting(SAPbouiCOM.Form oForm, string pStrPFormUID, string pCODE)
        {

            try
            {

                //oForm.UniqueID + "_Deliver" = oForm.UniqueID + "_Deliver";
                //oForm.UniqueID + "_Call" = oForm.UniqueID + "_Call";

                oForm.DataSources.UserDataSources.Item("pFORMUID").Value = pStrPFormUID;

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
                oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
                oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;

                // '// ADD YOUR ACTION CODE HERE ...
                //메트릭스 첫줄 선택시 팝업박스 뜨는것 막는다.
                oForm.Settings.EnableRowFormat = false;
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;

                // 지종
                FN.SetComboBoxValidValues(oMatrix, "U_PAPERTP", " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO01' ", FN.Enum_WholeTp.m_Nothing);

                // 독자구분
                FN.SetComboBoxValidValues(oMatrix, "U_READTP", " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO08'  ", FN.Enum_WholeTp.m_Nothing);

                // 배달 상태
                FN.SetComboBoxValidValues(oMatrix, "U_STATUS", " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO13' ", FN.Enum_WholeTp.m_Nothing);

                // 배달 가입방법
                FN.SetComboBoxValidValues(oMatrix, "U_METHOD", " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO14' ", FN.Enum_WholeTp.m_Nothing);

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                oMatrix.SelectionMode = BoMatrixSelect.ms_NotSupported;

                gCallTp_IDX = FN.GetColumnIndex(oMatrix, "U_CALLTP");
                gComment_IDX = FN.GetColumnIndex(oMatrix, "U_MEMO");

                // 콜유형
                FN.SetComboBoxValidValues(oMatrix, "U_CALLTP", " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO12' ", FN.Enum_WholeTp.m_Nothing);

                oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
                oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
                oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
                oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
                oDB2_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");


                System.Data.DataTable dt_DELIVER = SetParameterDataTableSchema(oForm.UniqueID + "_Deliver");
                System.Data.DataTable dt_CALL = SetParameterDataTableSchema(oForm.UniqueID + "_Call");

                gDs.Tables.AddRange(new System.Data.DataTable[] { dt_DELIVER, dt_CALL });

                // 독자그룹
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO03' ", "cboCATEGP1", FN.Enum_WholeTp.m_Space, "");
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO04' ", "cboCATEGP2", FN.Enum_WholeTp.m_Space, "");
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO05' ", "cboCATEGP3", FN.Enum_WholeTp.m_Space, "");
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO06' ", "cboCATEGP4", FN.Enum_WholeTp.m_Space, "");

                //문서상태 : 테이블 기본값에 지정함

                //계산서발행 
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO15' ", "cboVATGRUP", FN.Enum_WholeTp.m_Nothing);

                //은행
                FN.SetComboBoxValidValues(oForm, " SELECT  U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO40' AND U_USEYN = 'Y' ", "cboBANKNM", FN.Enum_WholeTp.m_Space, "");

                //신용카드
                FN.SetComboBoxValidValues(oForm, " SELECT  U_CD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO52' AND U_USEYN = 'Y' ", "cboCREDTBP", FN.Enum_WholeTp.m_Space, "");

                // 지종 2014-08-27
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO01' ", "cboPAPERCD", FN.Enum_WholeTp.m_Space, "");

                // 납부방법
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO09' ", "cboPAY_TP1", FN.Enum_WholeTp.m_Space, "");
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO09' ", "cboPAY_TP2", FN.Enum_WholeTp.m_Space, "");

                // 선납/후납
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO10' ", "cboADVPOST", FN.Enum_WholeTp.m_Space, "");

                // 납부시기
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO11' ", "cboPAYINST", FN.Enum_WholeTp.m_Space, "");

                // 배달상태
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO13' ", "cboF_STATU", FN.Enum_WholeTp.m_Space, "");

                // 직업
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO55' ", "cboJOB", FN.Enum_WholeTp.m_Space, "");


                // 신용카드인증키 발급구분
                FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SO56' ", "cboCREDREQ", FN.Enum_WholeTp.m_Space, "");

                oForm.DataBrowser.BrowseBy = "DocEntry";
                if (SO.SO_COMMON_HRD.Authority == SO.SO_COMMON_HRD.AuthorityType.H_CallCenter)
                {
                    FN.SetAutoManagedAttribute(ref oForm, "cboPAY_TP1,btnCREATE,btnSTOP,edtSTOPDT,btnFIND,btnPAYMETH,edtCode,edtF_RDEPT,edtF_CENT,edtF_TEL,cboF_STATU,edtF_ADDR,cboSTATUS,edtSUMCNT,btnEMAIL", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
                }
                else
                {
                    FN.SetAutoManagedAttribute(ref oForm, "cboPAY_TP1,btnCREATE,btnSTOP,edtSTOPDT,btnFIND,btnPAYMETH,edtCode,edtF_RDEPT,edtF_CENT,edtF_TEL,cboF_STATU,edtF_ADDR,edtSUMCNT", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
                }

                FN.SetAutoManagedAttribute(ref oForm, "btnCREATE,btnPAYMETH", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);
                FN.SetAutoManagedAttribute(ref oForm, "cboPAY_TP1,edtCode,edtCALLNM", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Find, BoModeVisualBehavior.mvb_True);
                FN.SetAutoManagedAttribute(ref oForm, "btnSTOP,edtSTOPDT,btnFIND,btnPAYMETH,edtF_RDEPT,edtF_CENT,edtF_TEL,cboF_STATU,edtF_ADDR,btnEMAIL", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);

                FN.SetAffectsFormMode(ref oForm, "edtF_RDEPT,edtF_CENT,edtF_TEL,cboF_STATU,edtF_ADDR", false);

                gUserName = FN.GetRecordsetValue(string.Format(" SELECT U_NAME FROM OUSR WHERE USERID = '{0}' ", B1Connections.diCompany.UserSignature.ToString()));

                // 거래처
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtCARDCD", "CardCode", BoFormItemTypes.it_EDIT);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtCARDNM", "CardName", BoFormItemTypes.it_EDIT);

                #region 콜센터담당자
                SAPbouiCOM.Conditions oCons = new Conditions();
                StringBuilder sb = new StringBuilder();
                sb.AppendLine(" SELECT STUFF ( (SELECT ',' + a.Code                    ");
                sb.AppendLine("                   FROM (SELECT DISTINCT Code           ");
                sb.AppendLine("                           FROM [@KIS_SO0010M_HRD]      ");
                sb.AppendLine("                          WHERE U_USERGBN = '20') AS a  ");
                sb.AppendLine("                 FOR XML PATH ( '' ))                   ");
                sb.AppendLine("             , 1                                        ");
                sb.AppendLine("             , 1                                        ");
                sb.AppendLine("             , '')                                      ");

                string strUserCode = FN.GetRecordsetValue(string.Format(sb.ToString(), B1Connections.diCompany.UserName));
                oCons = FN.GetConditionsWithQuery(string.Format("USER_CODE == {0}", strUserCode));

                #endregion

                // 콜센터담당자
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtCALLPER", "USER_CODE", BoFormItemTypes.it_EDIT, oCons);
                oCons = null;

                // 주소
                //FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtADDR1", "CardCode", BoFormItemTypes.it_EDIT);
                //FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtADDR2", "CardName", BoFormItemTypes.it_EDIT);

                // 요금제 
                FN.SetChooseFromListAdd(oForm, "KIS_SO0050_HRD", "mtx1_DUMY", "Name", BoFormItemTypes.it_MATRIX, null, "U_PAYNM");


                // 유치자
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_Employee).ToString(), "mtx1_DUMY", "U_EMPNO", BoFormItemTypes.it_MATRIX, null, "U_SAILCD");

                //// 분국
                FN.SetChooseFromListAdd(oForm, "KIS_SO0330_HRD", "mtx1_DUMY", "Name", BoFormItemTypes.it_MATRIX, null, "U_CENTNM");



                // 메트릭스 주소 (2014.06.12 TAB 이벤트로 처리)
                //FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "mtx1_DUMY", "CardCode", BoFormItemTypes.it_MATRIX, null, "U_ADDR1");
                //FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "mtx1_DUMY", "CardCode", BoFormItemTypes.it_MATRIX, null, "U_ADDR2");


                //string strTable = "@KIS_HR0060M";
                //string strFields = "U_DEPTCD,U_DEPTNM";

                //// 관련 테이블 필드 체크
                //if (!FN.GetUserFieldExists(strTable, strFields))
                //    throw new Exception(string.Format("독자관리에 필요한[{0}.{1}] 필드가 생성되지 않았습니다.", strTable, strFields));

                SetGridTitle(oForm);

                if (string.IsNullOrEmpty(SO.SO_COMMON_HRD.KeyValue) == false)
                {
                    GetDataLoad(oForm, SO.SO_COMMON_HRD.KeyValue);
                    SO.SO_COMMON_HRD.KeyValue = null;

                    // 청구데이터를 조회한다.
                    FindRequestData(oForm);

                    // 선수금잔액 조회
                    GetAdvanceAmt(oForm);
                }

                oForm.Items.Item("fld02").Click(BoCellClickType.ct_Regular);

            }
            catch (Exception)
            {
                throw;
            }
            finally
            {
                SO.SO_COMMON_HRD.KeyValue = null;
            }
        }
예제 #45
0
        public virtual bool ET_mtx1_DUMY_BFChooseFromList(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                KIS_SO0000F_HRD KIS_SO0000F_HRD = new KIS_SO0000F_HRD();
                switch (pVal.ColUID)
                {
                    case "U_PAYCD":
                        SetConditionsPaymeny(oMatrix, pVal);
                        break;
                    case "U_CENTCD":
                        SetConditionsBranchCenter(oMatrix, pVal);
                        break;

                    //case "U_ADDR1":  
                    //        KIS_SO0000F_HRD.Act0_SubFormInit("DTL_지번주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Numberoflot, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
                    //    return false;
                    //case "U_ADDR2":
                    //        KIS_SO0000F_HRD.Act0_SubFormInit("DTL_거리주소", oForm.UniqueID, SO.SO_COMMON_HRD.ZipCodeTypes.Road, BoMatrixSelect.ms_Single, pVal.Row, "CallBack");
                    //    return false;
                    default:
                        break;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
            return true;
        }
예제 #46
0
        public void SetCallDataApply(SAPbouiCOM.Form oForm, string pColID, int pRowID)
        {
            string strValue = string.Empty;
            string strIDX = string.Empty;
            string strRowStat = string.Empty;
            try
            {
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                //oMatrix.FlushToDataSource();

                strIDX = FN.GetMatirxCellValue(ref oMatrix, "U_IDX", pRowID); //DataTable 고유번호

                strRowStat = gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["ROWSTATE"].ToString(); //Row상태값

                switch (pColID)
                {
                    case "U_DELVCD":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", pRowID); //배달코드 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["DELVCD"] = strValue;
                        break;

                    case "U_CALLTP":

                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_CALLTP", pRowID); //콜유형
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["CALLTP"] = strValue;

                        //불착(U20), 주소변경(U30) ,지로출력요청(U60) ,계산서출력(U70) :: N:미결
                        if (strValue == "U20" || strValue == "U30" || strValue == "U60" || strValue == "U70")
                        {
                            // 처리상태
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "N");
                            gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "N";

                        }
                        else
                        {
                            // 처리상태 , O완료 디폴트:(O 완료)
                            oMatrix.SetCellWithoutValidation(pRowID, "U_PROSTAT", "O");
                            gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = "O";
                        }

                        break;
                    case "U_MEMO":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_MEMO", pRowID); //접수내용     
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["MEMO"] = strValue;
                        break;

                    case "U_RECVID":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVID", pRowID); //접수자코드
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVID"] = strValue;
                        break;

                    case "U_RECVNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVNM", pRowID); //접수자명  
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVNM"] = strValue;
                        break;

                    case "U_PROCID":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCID", pRowID); //처리자코드  
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCID"] = strValue;
                        break;

                    case "U_PROCNM":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCNM", pRowID); //처리자명 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCNM"] = strValue;
                        break;

                    case "U_RECVDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVDT", pRowID); //상담일자   
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVDT"] = strValue;
                        break;

                    case "U_RECVTI":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_RECVTI", pRowID); //상담시간
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVTI"] = strValue;
                        break;

                    case "U_PROCDT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROCDT", pRowID); //처리일자      
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCDT"] = strValue;
                        break;

                    case "U_PROSTAT":
                        strValue = FN.GetMatirxCellValue(ref oMatrix, "U_PROSTAT", pRowID); //처리상태 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROSTAT"] = strValue;
                        break;

                    default:
                        break;
                }

                DateTime deDate = B1Connections.diCompany.GetCompanyDate();
                string strDate = deDate.ToShortDateString();

                string U_RECVTI = B1Connections.diCompany.GetCompanyTime().Replace(":", "");//임포트 실행시간


                // 최초 등록일때만 처리자 및 처리일자 등록
                if (strRowStat == "I")
                {
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVID", B1Connections.diCompany.UserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVNM", gUserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVDT", strDate);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_RECVTI", U_RECVTI);

                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVDT"] = FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD);
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVTI"] = U_RECVTI;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVID"] = B1Connections.diCompany.UserName;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["RECVNM"] = gUserName;
                }

                // 수정하게되면 처리자 및 처리일자 갱신
                string strCallType = gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["CALLTP"].ToString();
                if (strCallType != "U20" && strCallType != "U30" && strCallType != "U60" && strCallType != "U70")
                {
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCID", B1Connections.diCompany.UserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCNM", gUserName);
                    oMatrix.SetCellWithoutValidation(pRowID, "U_PROCDT", strDate);

                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCDT"] = FN.SetDateFormatToDB(strDate, FN.eDateType.n_YYYYMMDD);
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCID"] = B1Connections.diCompany.UserName;
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["PROCNM"] = gUserName;
                }

                if (string.IsNullOrEmpty(strRowStat))
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows[int.Parse(strIDX)]["ROWSTATE"] = "M";

            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #47
0
        public virtual bool ET_mtx1_DUMY_BFMatrixLinkPressed(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            try
            {
                string KeyValue = string.Empty;

                switch (pVal.ColUID)
                {
                    case "U_SAILCD":
                        string strEmpNo = FN.GetMatirxCellValue(ref oMatrix, "U_SAILCD", pVal.Row);

                        // 사원번호로 사원마스터 키값을 조회한다.
                        string strUserId = GetEmployeeInfo(SO.SO_COMMON_HRD.QueryType_Employee.OHEM_Id, strEmpNo);
                        B1Connections.theAppl.OpenForm(BoFormObjectEnum.fo_Employee, null, strUserId);
                        return false;

                    case "U_PAYCD":

                        // 메모리에 
                        SO.SO_COMMON_HRD.KeyValue = FN.GetMatirxCellValue(ref oMatrix, "U_PAYCD", pVal.Row);
                        B1Connections.theAppl.ActivateMenuItem("KIS_SO0050A_HRD");
                        return false;

                    default:
                        break;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
                return false;
            }
            return true;
        }
예제 #48
0
        public virtual bool ET_mtx1_DUMY_BFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx1_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                if ((oMatrix.VisualRowCount > 0) && (pVal.Row > 0))
                    oForm.EnableMenu("1293", true);//행삭제
                else
                    oForm.EnableMenu("1293", false);//행삭제

                oForm.EnableMenu("1292", true);//행추가

                gRowIdx = pVal.Row;
                gSelMtx = pVal.ItemUID;
            }
            return true;
        }
예제 #49
0
        public virtual void ET_CallBack_AFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oButton = ((SAPbouiCOM.Button)(oForm.Items.Item("CallBack").Specific));

            // ADD YOUR ACTION CODE HERE ...
            string popupID = string.Empty;
            popupID = oButton.Caption.ToString();

            if (string.IsNullOrEmpty(popupID)) return;

            // 리턴 DataTable
            SAPbouiCOM.DataTable rDT = KIS_SO0000F_HRD.GetReturnDT(popupID, oForm.UniqueID);

            int rowIdx = KIS_SO0000F_HRD.GetSelectRowIdx(popupID, oForm.UniqueID);
            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
            int idx = GetDataTableIndexByMatrix(oMatrix, rowIdx);

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");

            switch (popupID)
            {
                case "DTL_지번주소":

                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR1", rDT.GetValue("RADDR_KOR", 0));
                    SetDeliveryDataApply(oForm, "U_ADDR1", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "DTL_거리주소":
                    oMatrix.SetCellWithoutValidation(rowIdx, "U_ADDR2", rDT.GetValue("RADDR_KOR", 0));
                    SetDeliveryDataApply(oForm, "U_ADDR2", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "MST_지번주소":

                    oDB_M.SetValue("U_ZIPCD1", 0, rDT.GetValue("ZIP_CD", 0));
                    oDB_M.SetValue("U_ADDR1", 0, rDT.GetValue("RADDR_KOR", 0));

                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "MST_거리주소":
                    oDB_M.SetValue("U_ZIPCD2", 0, rDT.GetValue("ZIP_CD", 0));
                    oDB_M.SetValue("U_ADDR2", 0, rDT.GetValue("RADDR_KOR", 0));

                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "접수내용":
                    rowIdx = int.Parse(oForm.DataSources.UserDataSources.Item("cRow").Value);

                    SetCallDataApply(oForm, "U_MEMO", rowIdx);
                    if (oForm.Mode == BoFormMode.fm_OK_MODE) oForm.Mode = BoFormMode.fm_UPDATE_MODE;
                    break;

                case "선수금내역":
                    break;

                default:
                    break;
            }
        }
예제 #50
0
        public virtual bool ET_mtx2_DUMY_BFClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            string USERID = string.Empty;

            if (oForm.Mode == BoFormMode.fm_ADD_MODE || oForm.Mode == BoFormMode.fm_UPDATE_MODE || oForm.Mode == BoFormMode.fm_OK_MODE)
            {
                USERID = B1Connections.diCompany.UserName.ToString();
                if ((oMatrix.VisualRowCount > 0) && (pVal.Row > 0))
                {
                    if (oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() != USERID)
                    {
                        oForm.EnableMenu("1293", false); //행삭제
                    }
                    else
                    {
                        oForm.EnableMenu("1293", true); //행삭제
                    }
                }
                else
                    oForm.EnableMenu("1293", false); //행삭제
          
                oForm.EnableMenu("1292", true);//행추가
                gRowIdx = pVal.Row;
                gSelMtx = pVal.ItemUID;
            }
            return true;
        }
예제 #51
0
        private void GetDataLoad(SAPbouiCOM.Form oForm, string pCode)
        {
            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
            oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
            oDB2_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");
            oDB1_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
            oDB2_Z = oForm.DataSources.DBDataSources.Item("@KIS_SO00302Z_HRD");

            //헤더데이터를 조회
            QueryWithConditions(ref oDB_M, "Code", pCode);
            if (oDB_M.Size > 0)
            {
                //헤더를 기준으로 라인데이터 조회
                QueryWithConditions(ref oDB1_O, "Code", pCode);
                QueryWithConditions(ref oDB2_O, "Code", pCode);

                SetSystemDataTable(oForm);
                oForm.Mode = BoFormMode.fm_OK_MODE;
            }
            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
            oMatrix.LoadFromDataSource();

            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_ORIG").Specific;
            oMatrix.LoadFromDataSource();
        }
예제 #52
0
 public virtual bool ET_mtx2_DUMY_BFRightClick(ContextMenuInfo pVal)
 {
     oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
     oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
     // ADD YOUR ACTION CODE HERE ...
     return true;
 }
예제 #53
0
        public virtual void ET_mtx2_DUMY_AFDoubleClick(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            string sTYPE = "";
            try
            {
                if (pVal.Row != 0)
                {
                    //접수자ID 와 로그인 ID 가 다를경우 접수내용 수정 불가
                    oMatrix.FlushToDataSource();

                    if ((oMatrix.GetCellSpecific("U_RECVID", pVal.Row).Value.Trim() == B1Connections.diCompany.UserName.ToString()) && (sFindTY == "F"))
                    { sTYPE = "TRUE"; }
                    else { sTYPE = "FASLE"; }

                    oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_SO0030M_HRD");
                    string extCOM = ((SAPbouiCOM.EditText)oMatrix.GetCellSpecific("U_MEMO", pVal.Row)).Value.Trim();
                    string strChildFormID = oForm.DataSources.UserDataSources.Item("cFORMUID2").Value;
                    if (!FN.GetFormExistsChk(strChildFormID))
                    {
                        KIS_SO0033A_HRD SO0033A_HRD = new KIS_SO0033A_HRD();
                        SO0033A_HRD.A00_SubFormInit(oForm.UniqueID, pVal.Row, extCOM, "접수내용", "CallBack", sTYPE);
                        SO0033A_HRD = null;
                    }
                    else
                    {
                        SAPbouiCOM.Form pForm = pForm = B1Connections.theAppl.Forms.Item(strChildFormID);
                        KIS_SO0033A_HRD.extSetting(pForm, extCOM, pVal.Row);
                        pForm.Select();
                        pForm = null;
                    }
                }

            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #54
0
        public virtual void ET_mtx2_DUMY_AFRightClick(ContextMenuInfo pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);

            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...
            oForm.EnableMenu("1292", false);//행추가
            oForm.EnableMenu("1293", false); //행삭제

            gRowIdx = -1;
            gSelMtx = null;
        }
예제 #55
0
        private void SetSystemDataTable(SAPbouiCOM.Form oForm)
        {
            try
            {     
                oDB1_O = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
                oDB2_O = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00302_HRD");

                oDB1_Z = (SAPbouiCOM.DBDataSource)oForm.DataSources.DBDataSources.Item("@KIS_SO00301Z_HRD");
                oDB1_Z.Clear();
                             
                //if (gDs.Tables[oForm.UniqueID + "_Deliver"] != null)
                //    gDs.Tables[oForm.UniqueID + "_Deliver"].Clear();
                //else
                //    gDs.Tables[oForm.UniqueID + "_Deliver"] = SetParameterDataTableSchema(oForm.UniqueID+"Deliver");

                if (gDs.Tables.Contains(oForm.UniqueID + "_Deliver"))
                {
                    gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.Clear();
                }
                else
                {
                    System.Data.DataTable dt = SetParameterDataTableSchema(oForm.UniqueID + "_Deliver");
                    gDs.Tables.Add(dt);
                }
                if (oDB1_O.Size > 0 && oDB1_O.GetValue("U_DELVCD", 0).ToString().Trim() != "")
                {

                    for (int i = 0; i < oDB1_O.Size; i++)
                    {
                        System.Data.DataRow dr;

                        // 데이터 필터를 위해 DataTable에 담는다.
                        dr = gDs.Tables[oForm.UniqueID + "_Deliver"].NewRow();

                        dr["IDX"] = i; // "DataTable 고유ID"
                        dr["LINEID"] = oDB1_O.GetValue("LineId", i);//"원본라인번호";
                        dr["DELVCD"] = oDB1_O.GetValue("U_DELVCD", i).Trim(); //"배달코드";
                        dr["RDEPT"] = oDB1_O.GetValue("U_RDEPT", i).Trim(); //"부서";
                        dr["PAPERTP"] = oDB1_O.GetValue("U_PAPERTP", i).Trim(); //"지종";
                        dr["PAYCD"] = oDB1_O.GetValue("U_PAYCD", i).Trim(); //"요금제코드";
                        dr["PAYNM"] = oDB1_O.GetValue("U_PAYNM", i).Trim(); //"요금제명";
                        dr["TEL"] = oDB1_O.GetValue("U_TEL", i).Trim(); //"연락처";
                        dr["MOBILE"] = oDB1_O.GetValue("U_MOBILE", i).Trim(); //"휴대폰";
                        dr["ADDR1"] = oDB1_O.GetValue("U_ADDR1", i).Trim(); //"주소1";
                        dr["ADDR2"] = oDB1_O.GetValue("U_ADDR2", i).Trim(); //"주소2";
                        dr["ADDR1_D"] = oDB1_O.GetValue("U_ADDR1_D", i).Trim(); //"주소1상세";
                        dr["ADDR2_D"] = oDB1_O.GetValue("U_ADDR2_D", i).Trim(); //"주소2상세";
                        dr["CENTCD"] = oDB1_O.GetValue("U_CENTCD", i).Trim(); //"지국";
                        dr["CENTNM"] = oDB1_O.GetValue("U_CENTNM", i).Trim(); //"지국명";
                        dr["DELVFR"] = oDB1_O.GetValue("U_DELVFR", i).Trim(); //"배달시작일";
                        dr["DELVTO"] = oDB1_O.GetValue("U_DELVTO", i).Trim(); //"배달종료일";
                        dr["DELVCNT"] = oDB1_O.GetValue("U_DELVCNT", i).Trim(); //"배달부수";
                        dr["METHOD"] = oDB1_O.GetValue("U_METHOD", i).Trim(); //"가입방법";
                        dr["SAILCD"] = oDB1_O.GetValue("U_SAILCD", i).Trim(); //"유치자";
                        dr["SAILNM"] = oDB1_O.GetValue("U_SAILNM", i).Trim(); //"유치자";
                        dr["STATUS"] = oDB1_O.GetValue("U_STATUS", i).Trim(); //"배달상태";
                        dr["SDEPT"] = oDB1_O.GetValue("U_SDEPT", i).Trim(); //"유치부서";
                        dr["NOTE"] = oDB1_O.GetValue("U_NOTE", i).Trim(); //"배달상세";

                        dr["JOINDT"] = oDB1_O.GetValue("U_JOINDT", i).Trim(); //"가입일자";
                        dr["CLOSEDT"] = oDB1_O.GetValue("U_CLOSEDT", i).Trim(); //"해지일자";
                        dr["USERSG1"] = oDB1_O.GetValue("U_USERSG1", i).Trim(); //"등록자";
                        dr["READTP"] = oDB1_O.GetValue("U_READTP", i).Trim(); //"독자구분";

                        dr["BTEL1"] = oDB1_O.GetValue("U_BTEL1", i).Trim(); //"분국전화1";
                        dr["BTEL2"] = oDB1_O.GetValue("U_BTEL2", i).Trim(); //"분국전화1";

                        dr["ROWSTATE"] = ""; // 기본: "", 수정: M, 신규: I, 삭제: D 
                        gDs.Tables[oForm.UniqueID + "_Deliver"].Rows.Add(dr);


                        oDB1_Z.InsertRecord(i);

                        oDB1_Z.SetValue("U_NO", i, (i + 1).ToString());//"번호";
                        oDB1_Z.SetValue("U_IDX", i, (i).ToString());//"DataTable 고유ID";
                        oDB1_Z.SetValue("LineId", i, oDB1_O.GetValue("LineId", i));//"원본라인번호";
                        oDB1_Z.SetValue("U_DELVCD", i, oDB1_O.GetValue("U_DELVCD", i).Trim()); //"배달코드";
                        oDB1_Z.SetValue("U_RDEPT", i, oDB1_O.GetValue("U_RDEPT", i).Trim()); //"부서";
                        oDB1_Z.SetValue("U_PAPERTP", i, oDB1_O.GetValue("U_PAPERTP", i).Trim()); //"지종";
                        oDB1_Z.SetValue("U_PAYCD", i, oDB1_O.GetValue("U_PAYCD", i).Trim()); //"요금제코드";
                        oDB1_Z.SetValue("U_PAYNM", i, oDB1_O.GetValue("U_PAYNM", i).Trim()); //"요금제명";
                        oDB1_Z.SetValue("U_TEL", i, oDB1_O.GetValue("U_TEL", i).Trim()); //"연락처";
                        oDB1_Z.SetValue("U_MOBILE", i, oDB1_O.GetValue("U_MOBILE", i).Trim()); //"휴대폰";
                        oDB1_Z.SetValue("U_ADDR1", i, oDB1_O.GetValue("U_ADDR1", i).Trim()); //"주소1";
                        oDB1_Z.SetValue("U_ADDR2", i, oDB1_O.GetValue("U_ADDR2", i).Trim()); //"주소2";
                        oDB1_Z.SetValue("U_ADDR1_D", i, oDB1_O.GetValue("U_ADDR1_D", i).Trim()); //"주소1";
                        oDB1_Z.SetValue("U_ADDR2_D", i, oDB1_O.GetValue("U_ADDR2_D", i).Trim()); //"주소2";
                        oDB1_Z.SetValue("U_CENTCD", i, oDB1_O.GetValue("U_CENTCD", i).Trim()); //"지국";
                        oDB1_Z.SetValue("U_CENTNM", i, oDB1_O.GetValue("U_CENTNM", i).Trim()); //"지국명";
                        oDB1_Z.SetValue("U_DELVFR", i, oDB1_O.GetValue("U_DELVFR", i).Trim()); //"배달시작일";
                        oDB1_Z.SetValue("U_DELVTO", i, oDB1_O.GetValue("U_DELVTO", i).Trim()); //"배달종료일";
                        oDB1_Z.SetValue("U_DELVCNT", i, oDB1_O.GetValue("U_DELVCNT", i).Trim()); //"배달부수";
                        oDB1_Z.SetValue("U_METHOD", i, oDB1_O.GetValue("U_METHOD", i).Trim()); //"가입방법";
                        oDB1_Z.SetValue("U_SAILCD", i, oDB1_O.GetValue("U_SAILCD", i).Trim()); //"유치자";
                        oDB1_Z.SetValue("U_SAILNM", i, oDB1_O.GetValue("U_SAILNM", i).Trim()); //"유치자";
                        oDB1_Z.SetValue("U_STATUS", i, oDB1_O.GetValue("U_STATUS", i).Trim()); //"배달상태";
                        oDB1_Z.SetValue("U_SDEPT", i, oDB1_O.GetValue("U_SDEPT", i).Trim()); //"유치부서";
                        oDB1_Z.SetValue("U_NOTE", i, oDB1_O.GetValue("U_NOTE", i).Trim()); //"배달상세";

                        oDB1_Z.SetValue("U_JOINDT", i, oDB1_O.GetValue("U_JOINDT", i).Trim()); //"가입일자";
                        oDB1_Z.SetValue("U_CLOSEDT", i, oDB1_O.GetValue("U_CLOSEDT", i).Trim()); //"해지일자";
                        oDB1_Z.SetValue("U_USERSG1", i, oDB1_O.GetValue("U_USERSG1", i).Trim()); //"등록자";
                        oDB1_Z.SetValue("U_READTP", i, oDB1_O.GetValue("U_READTP", i).Trim()); //"등록자";     

                        oDB1_Z.SetValue("U_BTEL1", i, oDB1_O.GetValue("U_BTEL1", i).Trim()); //"분국전화1";
                        oDB1_Z.SetValue("U_BTEL2", i, oDB1_O.GetValue("U_BTEL2", i).Trim()); //"분국전화2";    
                    }
                }

                //if (gDs.Tables[oForm.UniqueID + "_Call"] != null)
                //    gDs.Tables[oForm.UniqueID + "_Call"].Clear();
                //else
                //    gDs.Tables[oForm.UniqueID + "_Call"] = SetParameterDataTableSchema(oForm.UniqueID+"Call");
                if (gDs.Tables.Contains(oForm.UniqueID + "_Call"))
                {
                    gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
                }
                else
                {
                    System.Data.DataTable dt = SetParameterDataTableSchema(oForm.UniqueID + "_Call");
                    gDs.Tables.Add(dt);
                }

                if (oDB2_O.Size > 0 && oDB2_O.GetValue("U_DELVCD", 0).ToString().Trim() != "")
                {
                    for (int i = 0; i < oDB2_O.Size; i++)
                    {
                        System.Data.DataRow dr;

                        // 데이터 필터를 위해 DataTable에 담는다.
                        dr = gDs.Tables[oForm.UniqueID + "_Call"].NewRow();
                        dr["IDX"] = i; //"DataTable 고유ID";
                        dr["LINEID"] = oDB2_O.GetValue("LineId", i);//"원본라인번호";
                        dr["DELVCD"] = oDB2_O.GetValue("U_DELVCD", i).Trim(); //"배달코드"
                        dr["CALLTP"] = oDB2_O.GetValue("U_CALLTP", i).Trim(); //"콜유형"
                        dr["MEMO"] = oDB2_O.GetValue("U_MEMO", i).Trim(); //"접수내용"
                        dr["RECVID"] = oDB2_O.GetValue("U_RECVID", i).Trim(); //"접수자ID"
                        dr["RECVNM"] = oDB2_O.GetValue("U_RECVNM", i).Trim(); //"접수자명"
                        dr["RECVDT"] = oDB2_O.GetValue("U_RECVDT", i).Trim(); //"접수일자"
                        dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
                        dr["RECVTI"] = oDB2_O.GetValue("U_RECVTI", i).Trim(); //"접수시간"
                        dr["PROCID"] = oDB2_O.GetValue("U_PROCID", i).Trim(); //"처리자ID"
                        dr["PROCNM"] = oDB2_O.GetValue("U_PROCNM", i).Trim(); //"처리자명"
                        dr["PROCDT"] = oDB2_O.GetValue("U_PROCDT", i).Trim(); //"처리일자"
                        dr["PROSTAT"] = oDB2_O.GetValue("U_PROSTAT", i).Trim(); //"처리상태"
                        dr["ROWSTATE"] = ""; // 기본: "", 수정: M, 신규: I, 삭제: D 
                        gDs.Tables[oForm.UniqueID + "_Call"].Rows.Add(dr);
                    }
                }
                //else
                //{
                //    gDs.Tables[oForm.UniqueID + "_Call"].Rows.Clear();
                //}


                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                oMatrix.LoadFromDataSource();

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2_DUMY").Specific;
                oMatrix.Clear();
                //oMatrix.LoadFromDataSource();

                // 데이터 로드하면 메트릭스 선택된행 값 초기화 함.(중요)
                gDeliverySelect = -1;
            }
            catch (Exception)
            {
                throw;
            }
        }
예제 #56
0
        public virtual bool ET_BFRowDataMenu_Add(MenuEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.ActiveForm;

            bool rtnValue = true;

            if (gSelMtx == "mtx1_DUMY")
            {

            }
            else
            {
                // 배송리스트가 추가된 내역이 있으면
                int iCount = 0;
                var query = from c in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
                            where c.Field<string>("ROWSTATE") == "I"
                            select new { };

                iCount = query.Count();
                if (iCount > 0)
                {
                    rtnValue = false;
                    B1Connections.theAppl.StatusBar.SetText("배송리스트에 추가된 내역이 존재 합니다. 갱신후 상담내용을 수정해주세요.! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                }

                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_DUMY").Specific;
                int iSelectIndex = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_RowOrder);
                string strDELIVCD = FN.GetMatirxCellValue(ref oMatrix, "U_DELVCD", iSelectIndex);
                if ((string.IsNullOrEmpty(strDELIVCD)) || sFindTY == "")
                {
                    rtnValue = false;
                    B1Connections.theAppl.StatusBar.SetText("배송리스트를 선택해주세요! ", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                }
            }
            return rtnValue;
        }
예제 #57
0
        public virtual void ET_mtx2_DUMY_AFComboSelect(ItemEvent pVal)
        {
            oForm = B1Connections.theAppl.Forms.Item(pVal.FormUID);
            oMatrix = ((SAPbouiCOM.Matrix)(oForm.Items.Item("mtx2_DUMY").Specific));
            // ADD YOUR ACTION CODE HERE ...

            if (pVal.InnerEvent == false && pVal.ItemChanged == true)
                SetCallDataApply(oForm, pVal.ColUID, pVal.Row);
        }
예제 #58
0
파일: frm_JEM.cs 프로젝트: ubaidmughal/SAP
        private void InitiallizeForm()
        {
            //  dtHead = oForm.DataSources.DataTables.Item("dtHead");
            // dtHead.Rows.Add(1);

            dtPendingJEs.Columns.Add("V#");
            dtPendingJEs.Columns.Add("Date");
            dtPendingJEs.Columns.Add("Remarks");
            dtPendingJEs.Columns.Add("Month");
            dtPendingJEs.Columns.Add("Year");
            dtPendingJEs.Columns.Add("Posted");
            dtPendingJEs.Columns.Add("PostedJE");
            dtPendingJEs.Columns.Add("Canceled");
            dtPendingJEs.Columns.Add("CanceledJE");

            oForm.Freeze(true);
            mtJE   = oForm.Items.Item("mtJE").Specific;
            mtDet  = oForm.Items.Item("mtDet").Specific;
            dtDet  = oForm.DataSources.DataTables.Item("dtDet");
            dtHead = oForm.DataSources.DataTables.Item("dtHead");
            cbOr   = oForm.Items.Item("cbOr").Specific;
            IcbOr  = oForm.Items.Item("cbOr");
            cbOr.ValidValues.Add("All", "All");
            fillUserCb();

            oForm.DataSources.UserDataSources.Add("txDN", SAPbouiCOM.BoDataType.dt_LONG_NUMBER, 15); // Days of Month
            txDN  = oForm.Items.Item("txDN").Specific;
            ItxDN = oForm.Items.Item("txDN");
            txDN.DataBind.SetBound(true, "", "txDN");


            oForm.DataSources.UserDataSources.Add("txCJ", SAPbouiCOM.BoDataType.dt_LONG_NUMBER, 15); // Days of Month
            txCJ  = oForm.Items.Item("txCJ").Specific;
            itxCJ = oForm.Items.Item("txCJ");
            txCJ.DataBind.SetBound(true, "", "txCJ");


            oForm.DataSources.UserDataSources.Add("txPJ", SAPbouiCOM.BoDataType.dt_LONG_NUMBER, 15); // Days of Month
            txPJ  = oForm.Items.Item("txPJ").Specific;
            itxPJ = oForm.Items.Item("txPJ");
            txPJ.DataBind.SetBound(true, "", "txPJ");



            oForm.DataSources.UserDataSources.Add("txDD", SAPbouiCOM.BoDataType.dt_DATE); // Days of Month
            txDD  = oForm.Items.Item("txDD").Specific;
            ItxDD = oForm.Items.Item("txDD");
            txDD.DataBind.SetBound(true, "", "txDD");

            oForm.DataSources.UserDataSources.Add("txRem", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 50); // Days of Month
            txRem  = oForm.Items.Item("txRem").Specific;
            ItxRem = oForm.Items.Item("txRem");
            txRem.DataBind.SetBound(true, "", "txRem");

            oForm.DataSources.UserDataSources.Add("txRef1", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 30); // Days of Month
            txRef1  = oForm.Items.Item("txRef1").Specific;
            ItxRef1 = oForm.Items.Item("txRef1");
            txRef1.DataBind.SetBound(true, "", "txRef1");

            oForm.DataSources.UserDataSources.Add("txRef2", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 30);    // Days of Month
            txRef2  = oForm.Items.Item("txRef2").Specific;
            ItxRef2 = oForm.Items.Item("txRef2");
            txRef2.DataBind.SetBound(true, "", "txRef2");

            oForm.DataSources.UserDataSources.Add("txDS", SAPbouiCOM.BoDataType.dt_SUM);      // Days of Month
            txDS  = oForm.Items.Item("txDS").Specific;
            ItxDS = oForm.Items.Item("txDS");
            txDS.DataBind.SetBound(true, "", "txDS");


            oForm.DataSources.UserDataSources.Add("txCS", SAPbouiCOM.BoDataType.dt_SUM);      // Days of Month
            txCS  = oForm.Items.Item("txCS").Specific;
            ItxCS = oForm.Items.Item("txCS");
            txCS.DataBind.SetBound(true, "", "txCS");


            oForm.DataSources.UserDataSources.Add("chkPost", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1); // Days of Month
            chkPost  = oForm.Items.Item("chkPost").Specific;
            IchkPost = oForm.Items.Item("chkPost");
            chkPost.DataBind.SetBound(true, "", "chkPost");

            oForm.DataSources.UserDataSources.Add("optPP", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1); // Days of Month
            optPP  = oForm.Items.Item("optPP").Specific;
            ioptPP = oForm.Items.Item("optPP");
            optPP.DataBind.SetBound(true, "", "optPP");

            oForm.DataSources.UserDataSources.Add("optC", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1); // Days of Month
            optC  = oForm.Items.Item("optC").Specific;
            ioptC = oForm.Items.Item("optC");
            optC.DataBind.SetBound(true, "", "optC");

            oForm.DataSources.UserDataSources.Add("optPC", SAPbouiCOM.BoDataType.dt_SHORT_TEXT, 1); // Days of Month
            optPC  = oForm.Items.Item("optPC").Specific;
            ioptPC = oForm.Items.Item("optPC");
            optPC.DataBind.SetBound(true, "", "optPC");

            optC.GroupWith("optPP");
            optPC.GroupWith("optPP");
            optPP.Selected = true;

            btPost = oForm.Items.Item("btPost").Specific;

            lnkBG    = oForm.Items.Item("lnkBG").Specific;
            IchkPost = oForm.Items.Item("lnkBG");
        }
예제 #59
0
        public static void clsAPCreditMemo_ItemEvent(ref SAPbouiCOM.Application oApplication, ref SAPbobsCOM.Company oCompany, SAPbouiCOM.Form oSetupForm, ref SAPbouiCOM.ItemEvent pVal, ref bool BubbleEvent)
        {
            oForm            = oSetupForm;
            oHDBDataSource   = oForm.DataSources.DBDataSources.Item("ORPC");
            oChildDataSource = oForm.DataSources.DBDataSources.Item("RPC1");
            oMatrix          = (SAPbouiCOM.Matrix)oForm.Items.Item("38").Specific;

            if (pVal.BeforeAction)
            {
                switch (pVal.EventType)
                {
                case SAPbouiCOM.BoEventTypes.et_CLICK:
                    if (pVal.ItemUID == "38" && (pVal.ColUID == "U_Variance" || pVal.ColUID == "U_DiscExc"))
                    {
                        BubbleEvent = false;
                    }
                    if (oForm.Mode == SAPbouiCOM.BoFormMode.fm_OK_MODE || oForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE)
                    {
                        if (pVal.ItemUID == "U_DocType")
                        {
                            BubbleEvent = false;
                        }
                    }
                    break;

                case SAPbouiCOM.BoEventTypes.et_PICKER_CLICKED:
                    if (pVal.ItemUID == "38" && pVal.ColUID == "U_Variance")
                    {
                        BubbleEvent = false;
                    }
                    break;

                case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED:
                    if (pVal.ItemUID == "btnSH")
                    {
                        if (((SAPbouiCOM.EditText)oForm.Items.Item("4").Specific).Value.Trim() == "")
                        {
                            oApplication.StatusBar.SetText("Select the Supplier....", SAPbouiCOM.BoMessageTime.bmt_Short, SAPbouiCOM.BoStatusBarMessageType.smt_Error);
                            BubbleEvent = false;
                        }

                        if (oHDBDataSource.GetValue("DocStatus", oHDBDataSource.Offset).ToString().Trim() != "O")
                        {
                            BubbleEvent = false;
                        }

                        // strDocEntry = oHDBDataSource.GetValue("DocEntry", 0).Trim();
                        //strDocType = oHDBDataSource.GetValue("U_DocType", 0).Trim();
                    }
                    break;

                default:
                    break;
                }
            }

            else if (pVal.BeforeAction == false)
            {
                switch (pVal.EventType)
                {
                case SAPbouiCOM.BoEventTypes.et_FORM_LOAD:
                    //Utilities.UtilitiesCls.CreateButtonItem(oForm, "btnSH", oForm.Items.Item("2").Left + oForm.Items.Item("2").Width + 6, oForm.Items.Item("2").Top, oForm.Items.Item("2").Width + 8, oForm.Items.Item("2").Height, "Purchase History", true, 0, "");
                    Utilities.UtilitiesCls.CreateButtonItem(oForm, "btnSH", oForm.Items.Item("46").Left, oForm.Items.Item("46").Top + 20, oForm.Items.Item("46").Width, oForm.Items.Item("2").Height, "Purchase History", true, 0, "46");
                    break;

                case SAPbouiCOM.BoEventTypes.et_ITEM_PRESSED:
                    if (pVal.ItemUID == "1")
                    {
                        if (pVal.ActionSuccess)
                        {
                            if (oWaitForm != null)
                            {
                                oWaitForm.Close();
                                oWaitForm = null;
                            }
                        }
                    }

                    if (pVal.ItemUID == "btnSH")
                    {
                        try
                        {
                            if (oWaitForm != null)
                            {
                                string strCardCode1 = ((SAPbouiCOM.EditText)oForm.Items.Item("4").Specific).Value.Trim();
                                string strCardCode2 = ((SAPbouiCOM.EditText)oWaitForm.Items.Item("6").Specific).Value.Trim();

                                if (strCardCode1 != strCardCode2)
                                {
                                    oWaitForm.Close();
                                    oWaitForm = null;
                                }
                            }
                        }
                        catch (Exception)
                        {
                            oWaitForm = null;
                        }

                        if (oWaitForm == null)
                        {
                            string strQry;
                            oWaitForm = clsSBO.LoadForm("EJ_OSSH.srf", "EJ_OSSH", oApplication);

                            ((SAPbouiCOM.EditText)oWaitForm.Items.Item("6").Specific).Value = ((SAPbouiCOM.EditText)oForm.Items.Item("4").Specific).Value.Trim();
                            ((SAPbouiCOM.EditText)oWaitForm.Items.Item("8").Specific).Value = ((SAPbouiCOM.EditText)oForm.Items.Item("54").Specific).Value.Trim();
                            oWaitForm.Freeze(true);
                            oWaitForm.DataSources.DataTables.Add("@dtTemp");
                            SAPbouiCOM.Grid oGrid;
                            oGrid      = (SAPbouiCOM.Grid)oWaitForm.Items.Item("4").Specific;
                            oRecordSet = (SAPbobsCOM.Recordset)oCompany.GetBusinessObject(BoObjectTypes.BoRecordset);
                            //  strQry = "Exec \"EJ_SupplierCMPurchaseHistory\"  '" + ((SAPbouiCOM.EditText)oForm.Items.Item("4").Specific).Value.Trim() + "'";
                            strQry = "Exec \"EJ_SupplierPurchaseHistory\"  '" + ((SAPbouiCOM.EditText)oForm.Items.Item("4").Specific).Value.Trim() + "'";

                            oWaitForm.DataSources.DataTables.Item(0).ExecuteQuery(strQry);
                            oGrid.DataTable = oWaitForm.DataSources.DataTables.Item(0);
                            oGrid.Columns.Item(0).Editable = true;
                            SAPbouiCOM.EditTextColumn oEditTxt = ((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item(0));
                            oEditTxt.ChooseFromListUID     = "CFL_2";
                            oEditTxt.ChooseFromListAlias   = "ItemCode";
                            oGrid.Columns.Item(1).Editable = false;
                            oGrid.Columns.Item(2).Editable = true;
                            oGrid.Columns.Item(3).Editable = true;
                            oEditTxt = ((SAPbouiCOM.EditTextColumn)oGrid.Columns.Item(3));
                            oEditTxt.ChooseFromListUID     = "CFL_3";
                            oEditTxt.ChooseFromListAlias   = "UomCode";
                            oGrid.Columns.Item(4).Editable = true;
                            oGrid.Columns.Item(0).Editable = true;

                            for (int j = 5; j < oGrid.Columns.Count; j++)
                            {
                                oGrid.Columns.Item(j).Editable = false;
                            }

                            oGrid.AutoResizeColumns();
                            oGrid.DataTable.Rows.Add(1);

                            clsSupplierPurchaseHistory.oForm   = oWaitForm;
                            clsSupplierPurchaseHistory.oSOForm = oForm;
                            oWaitForm.Freeze(false);
                        }
                        else
                        {
                            oWaitForm.Visible = true;
                        }
                    }
                    break;

                case SAPbouiCOM.BoEventTypes.et_LOST_FOCUS:
                    if (oForm.Mode == SAPbouiCOM.BoFormMode.fm_ADD_MODE || oForm.Mode == SAPbouiCOM.BoFormMode.fm_UPDATE_MODE)
                    {
                        if (pVal.ItemUID == "12")
                        {
                            //oForm.DefButton = "btnSH";
                            // oForm.ActiveItem = "btnSH";
                            ((SAPbouiCOM.Button)oForm.Items.Item("btnSH").Specific).Item.Click(BoCellClickType.ct_Regular);
                        }
                    }
                    break;

                case SAPbouiCOM.BoEventTypes.et_FORM_CLOSE:
                    if (oWaitForm != null)
                    {
                        oWaitForm.Close();
                        oWaitForm = null;
                    }
                    break;

                default:
                    break;
                }
            }
        }
예제 #60
0
        private bool DataToDbDataSource_DELIVER(SAPbouiCOM.Form oForm)
        {
            bool rtnValue = false;
            try
            {
                oDB1_O = oForm.DataSources.DBDataSources.Item("@KIS_SO00301_HRD");
                oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1_ORIG").Specific;
                oMatrix.FlushToDataSource();
                /*
                // 1. 메트릭스 삭제대상 삭제 적용
                var objDelete = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "D"
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX") +1                               
                                };

                foreach (var itemSub in objDelete)
                {
                    //삭제할것들 선택한다.
                    oMatrix.SelectRow(itemSub.vIDX, true, true);
                }

                // 선택된 Rows를 삭제한다.
                int iSelectIdx = 0;

                while (iSelectIdx != -1)
                {
                    iSelectIdx = oMatrix.GetNextSelectedRow(0, BoOrderType.ot_SelectionOrder);
                    if (iSelectIdx != -1)
                        oMatrix.DeleteRow(iSelectIdx);
                }
                if(objDelete.Count() > 0)
                    oMatrix.FlushToDataSource();
                */

                // 2. 수정, 추가된내역 적용
                var objModify = from row in gDs.Tables[oForm.UniqueID + "_Deliver"].AsEnumerable()
                                where row.Field<string>("ROWSTATE") == "M" || row.Field<string>("ROWSTATE") == "I"
                                select new
                                {
                                    vIDX = row.Field<Int32>("IDX")
                                    ,
                                    vDELVCD = row.Field<string>("DELVCD")
                                    ,
                                    vRDEPT = row.Field<string>("RDEPT")
                                    ,
                                    vPAPERTP = row.Field<string>("PAPERTP")
                                    ,
                                    vPAYCD = row.Field<string>("PAYCD")
                                    ,
                                    vPAYNM = row.Field<string>("PAYNM")
                                    ,
                                    vTEL = row.Field<string>("TEL")
                                    ,
                                    vMOBILE = row.Field<string>("MOBILE")
                                    ,
                                    vADDR1 = row.Field<string>("ADDR1")
                                    ,
                                    vADDR2 = row.Field<string>("ADDR2")
                                    ,
                                    vADDR1_D = row.Field<string>("ADDR1_D")
                                    ,
                                    vADDR2_D = row.Field<string>("ADDR2_D")
                                    ,
                                    vCENTCD = row.Field<string>("CENTCD")
                                    ,
                                    vCENTNM = row.Field<string>("CENTNM")
                                    ,
                                    vDELVFR = row.Field<string>("DELVFR")
                                    ,
                                    vDELVTO = row.Field<string>("DELVTO")
                                    ,
                                    vDELVCNT = row.Field<Int32>("DELVCNT")
                                    ,
                                    vMETHOD = row.Field<string>("METHOD")
                                    ,
                                    vSAILCD = row.Field<string>("SAILCD")
                                    ,
                                    vSAILNM = row.Field<string>("SAILNM")
                                    ,
                                    vSDEPT = row.Field<string>("SDEPT")
                                    ,
                                    vSTATUS = row.Field<string>("STATUS")
                                    ,
                                    vNOTE = row.Field<string>("NOTE")
                                    ,
                                    vJOINDT = row.Field<string>("JOINDT")
                                    ,
                                    vCLOSEDT = row.Field<string>("CLOSEDT")
                                    ,
                                    vUSERSG1 = row.Field<string>("USERSG1")
                                    ,
                                    vREADTP = row.Field<string>("READTP")
                                    ,
                                    vBTEL1 = row.Field<string>("BTEL1")
                                    ,
                                    vBTEL2 = row.Field<string>("BTEL2")
                                    ,
                                    vROWSTATE = row.Field<string>("ROWSTATE")
                                };

                foreach (var itemSub in objModify)
                {
                    if (itemSub.vROWSTATE == "I")
                        SetDbDataSourceAddRow(ref oForm, ref oMatrix, ref oDB1_O, "U_DELVCD");

                    oDB1_O.SetValue("U_DELVCD", itemSub.vIDX, itemSub.vDELVCD);
                    oDB1_O.SetValue("U_RDEPT", itemSub.vIDX, itemSub.vRDEPT);
                    oDB1_O.SetValue("U_PAPERTP", itemSub.vIDX, itemSub.vPAPERTP);
                    oDB1_O.SetValue("U_READTP", itemSub.vIDX, itemSub.vREADTP);

                    oDB1_O.SetValue("U_PAYCD", itemSub.vIDX, itemSub.vPAYCD);
                    oDB1_O.SetValue("U_PAYNM", itemSub.vIDX, itemSub.vPAYNM);

                    oDB1_O.SetValue("U_TEL", itemSub.vIDX, itemSub.vTEL);
                    oDB1_O.SetValue("U_MOBILE", itemSub.vIDX, itemSub.vMOBILE);
                    oDB1_O.SetValue("U_ADDR1", itemSub.vIDX, itemSub.vADDR1);
                    oDB1_O.SetValue("U_ADDR2", itemSub.vIDX, itemSub.vADDR2);
                    oDB1_O.SetValue("U_ADDR1_D", itemSub.vIDX, itemSub.vADDR1_D);
                    oDB1_O.SetValue("U_ADDR2_D", itemSub.vIDX, itemSub.vADDR2_D);
                    oDB1_O.SetValue("U_CENTCD", itemSub.vIDX, itemSub.vCENTCD);
                    oDB1_O.SetValue("U_CENTNM", itemSub.vIDX, itemSub.vCENTNM);
                    oDB1_O.SetValue("U_DELVFR", itemSub.vIDX, itemSub.vDELVFR);
                    oDB1_O.SetValue("U_DELVTO", itemSub.vIDX, itemSub.vDELVTO);
                    oDB1_O.SetValue("U_DELVCNT", itemSub.vIDX, itemSub.vDELVCNT.ToString());
                    oDB1_O.SetValue("U_METHOD", itemSub.vIDX, itemSub.vMETHOD);
                    oDB1_O.SetValue("U_STATUS", itemSub.vIDX, itemSub.vSTATUS);
                    oDB1_O.SetValue("U_SAILCD", itemSub.vIDX, itemSub.vSAILCD);
                    oDB1_O.SetValue("U_SAILNM", itemSub.vIDX, itemSub.vSAILNM);
                    oDB1_O.SetValue("U_SDEPT", itemSub.vIDX, itemSub.vSDEPT);
                    oDB1_O.SetValue("U_NOTE", itemSub.vIDX, itemSub.vNOTE);
                    oDB1_O.SetValue("U_JOINDT", itemSub.vIDX, itemSub.vJOINDT);
                    oDB1_O.SetValue("U_CLOSEDT", itemSub.vIDX, itemSub.vCLOSEDT);
                    oDB1_O.SetValue("U_USERSG1", itemSub.vIDX, itemSub.vUSERSG1); //등록자

                    oDB1_O.SetValue("U_BTEL1", itemSub.vIDX, itemSub.vBTEL1); //분국전화1
                    oDB1_O.SetValue("U_BTEL2", itemSub.vIDX, itemSub.vBTEL2); //분국전화2

                }
                if (objModify.Count() > 0)
                    oMatrix.LoadFromDataSource();

                rtnValue = true;
            }
            catch (Exception)
            {
                throw;
            }
            return rtnValue;
        }