当前位置: 首页>>代码示例>>C#>>正文


C# Conditions.Add方法代码示例

本文整理汇总了C#中Conditions.Add方法的典型用法代码示例。如果您正苦于以下问题:C# Conditions.Add方法的具体用法?C# Conditions.Add怎么用?C# Conditions.Add使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Conditions的用法示例。


在下文中一共展示了Conditions.Add方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // '// ADD YOUR ACTION CODE HERE ...
            StringBuilder sb = new StringBuilder();
            try
            {
                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;

                }
                #endregion

                oForm.DataSources.UserDataSources.Item("edtDOCDTF").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
                oForm.DataSources.UserDataSources.Item("edtDOCDTT").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd");

                #region EditText

                //매출처
                #region BusinessPartner Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "CardType";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "C";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "frozenFor";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtCARDCDF", "CardCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtCARDNMF", "CardName", BoFormItemTypes.it_EDIT, oCons);

                //대행사
                #region BusinessPartner Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "CardType";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "S";//공급업체

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "frozenFor";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPCDF", "CardCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPNMF", "CardName", BoFormItemTypes.it_EDIT, oCons);

                #endregion

                #region ComboBox
                //매출부서
                FN.SetComboBoxValidValues(oForm, "SELECT PrcCode,PrcName FROM OPRC WHERE DimCode = '1' AND Locked = 'N' ORDER BY PrcCode ", "cboPRCCD", FN.Enum_WholeTp.m_TotalTxt);
                oCombo = oForm.Items.Item("cboPRCCD").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboPRCCD").Value = oCombo.ValidValues.Item(0).Value;
                }

                //영업사원
                FN.SetComboBoxValidValues(oForm, "SELECT SlpCode,SlpName FROM OSLP WHERE Active = 'Y' AND Locked = 'N' ORDER BY SlpCode ", "cboSLPCD", FN.Enum_WholeTp.m_TotalTxt);
                oCombo = oForm.Items.Item("cboSLPCD").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboSLPCD").Value = oCombo.ValidValues.Item(0).Value;
                }

                //간행물
                FN.SetComboBoxValidValues(oForm, "SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SD01' AND U_USEYN = 'Y' ", "cboPUBLICA", FN.Enum_WholeTp.m_TotalTxt);
                oCombo = oForm.Items.Item("cboPUBLICA").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboPUBLICA").Value = oCombo.ValidValues.Item(0).Value;
                }

                #endregion

                oForm.DataSources.DataTables.Add("grd");
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SD0150F_HRD.cs

示例2: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting(SAPbouiCOM.Form oForm)
        {
            // '// ADD YOUR ACTION CODE HERE ...
            oForm.Settings.EnableRowFormat = false;
            // UDO, 네비게이션 사용하지 않음
            oForm.SupportedModes = 1;

            FN.SetOptionBtn(ref oForm, "optALL(A),optREAD(R),optCENT(C)", "optALL");
            string strYYYYMM = FN.SetDateFormatToDB(DateTimeLibrary.FirstDayOfCurrentMonth(), FN.eDateType.n_YYYYMMDD).Substring(0, 6);

            // 청구년월 시작
            oComboBox = oForm.Items.Item("cboREQYM_F").Specific;
            SO.SO_COMMON_HRD.SetComboValue_YearMonth(ref oComboBox, FN.Enum_WholeTp.m_Nothing, strYYYYMM);

            // 청구년월 종료
            oComboBox = oForm.Items.Item("cboREQYM_T").Specific;
            SO.SO_COMMON_HRD.SetComboValue_YearMonth(ref oComboBox, FN.Enum_WholeTp.m_Nothing, strYYYYMM);

            // 계산서발행구분
            FN.SetComboBoxValidValues(oForm, " SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code ='SO15' AND U_SMLCD IN ('U0', 'U1', 'U3', 'U5') ", "cboBILLTP", FN.Enum_WholeTp.m_Space);

            #region 독자마스터 Condition
            SAPbouiCOM.Conditions oCons = new Conditions(); ;
            SAPbouiCOM.Condition oCon = oCons.Add();

            oCon.Alias = "U_VATGRUP"; //계산서발행구분 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U0"; // 발행(전자)

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_VATGRUP"; 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U1"; // 발행(종이)

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_VATGRUP"; 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U3"; // 수기발행(선납)

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_VATGRUP"; 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U5"; // 발행(전자타사)

            #endregion
            FN.SetChooseFromListAdd(oForm, "KIS_SO0030_HRD", "edtREAD_F", "Code", BoFormItemTypes.it_EDIT, oCons, "edtREAD_F");
            FN.SetChooseFromListAdd(oForm, "KIS_SO0030_HRD", "edtREAD_T", "Code", BoFormItemTypes.it_EDIT, oCons, "edtREAD_T");


            #region 지국마스터 Condition
            oCons = new Conditions(); ;
            oCon = oCons.Add();

            oCon.Alias = "U_BILLGBN"; //계산서발행구분 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U0"; // 발행(전자)

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_BILLGBN"; // 발행(종이)
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U1";

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_BILLGBN"; // 발행(종이)
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U3";

            oCon.Relationship = BoConditionRelationship.cr_OR;

            oCon = oCons.Add();
            oCon.Alias = "U_BILLGBN"; // 발행(종이)
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U5";

            #endregion
            FN.SetChooseFromListAdd(oForm, "KIS_SO0040_HRD", "edtCENT_F", "Code", BoFormItemTypes.it_EDIT, oCons, "edtCENT_F");
            FN.SetChooseFromListAdd(oForm, "KIS_SO0040_HRD", "edtCENT_T", "Code", BoFormItemTypes.it_EDIT, oCons, "edtCENT_T");

            SetGridTitle(oForm);

            SAPbouiCOM.Item oItem = oForm.Items.Item("fld01");
            oItem.Click();
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:96,代码来源:KIS_SO0230A_HRD.cs

示例3: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting()
        {
            // '// ADD YOUR ACTION CODE HERE ...
            //메트릭스 첫줄 선택시 팝업박스 뜨는것 막는다.
            oForm.Settings.EnableRowFormat = false;
            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx1").Specific;
            oMatrix.SelectionMode = BoMatrixSelect.ms_Single;

            FN.SetComboBoxValidValues(oMatrix, "U_VATGRP", " SELECT Code, [Name] FROM OVTG WHERE Code = 'A0' ", FN.Enum_WholeTp.m_Nothing);
            
            oMatrix = (SAPbouiCOM.Matrix)oForm.Items.Item("mtx2").Specific;
            oMatrix.SelectionMode = BoMatrixSelect.ms_Single;

            FN.SetComboBoxValidValues(oMatrix, "U_VATGRP", " SELECT Code, [Name] FROM OVTG WHERE Code = 'A0' ", FN.Enum_WholeTp.m_Nothing);

            oForm.DataBrowser.BrowseBy = "edtENTRY";

            #region 독자마스터 Condition
            SAPbouiCOM.Conditions oCons = new Conditions();
            SAPbouiCOM.Condition oCon = oCons.Add();

            //oCon.Alias = "U_VATGRUP"; //계산서발행구분 
            //oCon.Operation = BoConditionOperation.co_EQUAL;
            //oCon.CondVal = "U3"; // 수기발행

            oCon.Alias = "U_ADVPOST"; //선후납구분 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U10"; // 선납발행

            //oCon.Relationship = BoConditionRelationship.cr_AND;

            //oCon = oCons.Add();
            //oCon.Alias = "U_TYPE"; // 독자구분
            //oCon.Operation = BoConditionOperation.co_EQUAL;
            //oCon.CondVal = "U10"; // 정상독자

            #endregion

            // 메트릭스 독자
            FN.SetChooseFromListAdd(oForm, "KIS_SO0030_HRD", "mtx1", "Code", BoFormItemTypes.it_MATRIX, oCons, "U_READCD");


            #region 지국마스터 Condition
            oCons = new Conditions(); ;
            oCon = oCons.Add();

            oCon.Alias = "U_BILLGBN"; //계산서발행구분 
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "U3"; // 수기발행
            
            #endregion
            // 메트릭스 지국
            FN.SetChooseFromListAdd(oForm, "KIS_SO0040_HRD", "mtx2", "Code", BoFormItemTypes.it_MATRIX, oCons, "U_CENTCD");

            FN.SetAutoManagedAttribute(ref oForm, "edtENTRY,cboSTATUS", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
            FN.SetAutoManagedAttribute(ref oForm, "edtENTRY,cboSTATUS", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Find, BoModeVisualBehavior.mvb_True);

            SAPbouiCOM.Item oItem = oForm.Items.Item("fld02");
            oItem.Click();
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:63,代码来源:KIS_SO0380A_HRD.cs

示例4: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // '// ADD YOUR ACTION CODE HERE ...

            #region Form Setting

            oForm.DataBrowser.BrowseBy = "DocEntry";

            oForm.SupportedModes = -1;
            oForm.Settings.EnableRowFormat = false;
            oForm.Settings.Enabled = false;
            oForm.AutoManaged = true;
            oForm.PaneLevel = 1;

            #endregion

            oForm.Mode = BoFormMode.fm_ADD_MODE;

            oDB_M = oForm.DataSources.DBDataSources.Item("@KIS_FI0010M_HRD");
            oDB_1 = oForm.DataSources.DBDataSources.Item("@KIS_FI00101_HRD");

            string strNowDate = B1Connections.diCompany.GetCompanyDate().ToShortDateString();         
            strNowDate = FN.SetDateFormatToDB(strNowDate, FN.eDateType.p_YYYYMMDD);
            oDB_M.SetValue("U_DOCDATE", 0, strNowDate.Replace(".", ""));
            oDB_M.SetValue("U_USERID", 0, B1Connections.theAppl.Company.UserName);
           
            oComboBox = oForm.Items.Item("cboYYYY").Specific;
            FN.SetComboBoxValidValues(oForm, " SELECT YEAR AS CODE, YEAR AS NAME FROM OACP ", "cboYYYY", FN.Enum_WholeTp.m_Nothing);
            oComboBox.Select(FN.Left(strNowDate,4) , BoSearchKey.psk_ByValue);

            oComboBox = oForm.Items.Item("cboTYPE").Specific;
            FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'FI01' AND U_USEYN = 'Y' ", "cboTYPE", FN.Enum_WholeTp.m_Nothing);
            oComboBox.Select(0, BoSearchKey.psk_Index);

            #region EditText

            // 코스트센터그룹
            SAPbouiCOM.Conditions oCons = new Conditions();
            FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOSTFR", "Code", BoFormItemTypes.it_EDIT, oCons);
            FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOSTTO", "Code", BoFormItemTypes.it_EDIT, oCons);

            // 공통비 코스트센터 그룹
            FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "edtCOMGPCD", "Code", BoFormItemTypes.it_EDIT, oCons);

            // 원가그룹
            FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtDISACCD", "Code", BoFormItemTypes.it_EDIT, oCons);
            FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtCOPECD", "Code", BoFormItemTypes.it_EDIT, oCons);
            FN.SetChooseFromListAdd(oForm, "KIS_CO0100", "edtCOAMCD", "Code", BoFormItemTypes.it_EDIT, oCons);

            // 계정코드
            #region GLAccounts Conditions
            oCons = new Conditions();
            SAPbouiCOM.Condition oCon = oCons.Add();

            oCon.Alias = "U_CATEGORY";
            oCon.Operation = BoConditionOperation.co_EQUAL;
            oCon.CondVal = "S09";

            #endregion

            FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtCOMPECD", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
            FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtCOMAMCD", "AcctCode", BoFormItemTypes.it_EDIT, oCons);

            #endregion

            #region Matrix
            oMatrix = oForm.Items.Item("mtx").Specific;
            oMatrix.SelectionMode = BoMatrixSelect.ms_None;

            // 메트릭스 
            FN.SetChooseFromListAdd(oForm, "KIS_CO0110", "mtx", "Code", BoFormItemTypes.it_MATRIX, null, "U_PRCCD");

            FN.SetSumField(ref oMatrix, "U_1MON,U_2MON,U_3MON,U_4MON,U_5MON,U_6MON,U_7MON,U_8MON,U_9MON,U_10MON,U_11MON,U_12MON");

            //FN.SetMatrixAddRow(ref oForm, ref oMatrix, ref oDB_1, FN.RowSelectMode.SelectedLine, "U_PRCCD");

            #endregion

            #region SetAutoManagedAttribute

            string AllString = "cboYYYY,cboTYPE,edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,edtCOMPECD,edtCOMAMCD,mtx,btnFIND";
            string AddString = "cboYYYY,cboTYPE,edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,mtx,btnFIND";
            string OKString = "edtCOMGPCD,edtDISACCD,edtCOPECD,edtCOAMCD,mtx,btnFIND";
            string FindString = "cboYYYY,cboTYPE";

            FN.SetAutoManagedAttribute(ref oForm, AllString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
            FN.SetAutoManagedAttribute(ref oForm, AddString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);
            FN.SetAutoManagedAttribute(ref oForm, OKString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Ok, BoModeVisualBehavior.mvb_True);
            FN.SetAutoManagedAttribute(ref oForm, FindString, BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Find, BoModeVisualBehavior.mvb_True);

            #endregion    

        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:95,代码来源:KIS_FI0010A_HRD.cs

示例5: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        /// <param name="oForm"></param>
        private void Act3_DefualtSetting(string pformuid = "")
        {
            try
            {

                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = false;
                if (oForm.Mode != BoFormMode.fm_OK_MODE && oForm.Mode != BoFormMode.fm_VIEW_MODE)
                {
                    oForm.Mode = BoFormMode.fm_OK_MODE;
                }
                #endregion

                if (pformuid != "")
                {
                    oForm.DataSources.UserDataSources.Item("pformuid").ValueEx = pformuid;
                    SAPbouiCOM.Form pForm = (SAPbouiCOM.Form)B1Connections.theAppl.Forms.Item(pformuid);
                    pForm.DataSources.UserDataSources.Item("cformuid").ValueEx = oForm.UniqueID;
                }

                #region ComboBox

                //사업장
                FN.SetComboBoxValidValues(oForm, "SELECT BPLID,BPLName FROM [OBPL] ORDER BY 1 ASC", "cboBPLID", FN.Enum_WholeTp.m_Nothing);
                SAPbouiCOM.ComboBox oCombo = oForm.Items.Item("cboBPLID").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboBPLID").ValueEx = oCombo.ValidValues.Item(0).Value;
                }

                #endregion

                #region EditText


                //코스트센터
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;

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

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                //출금계좌
                #region HouseBankAccounts
                

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCOUNT", "Account", BoFormItemTypes.it_EDIT, null);
                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCTCD", "GLAccount", BoFormItemTypes.it_EDIT, null);

                #endregion

                #region Grid
                SAPbouiCOM.Grid oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_NotSupported;

                Veiw_Grid1_DataTable(oForm);

                #endregion

                //FN.SetAutoManagedAttribute(ref oForm, "edtMAINCD", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_All, BoModeVisualBehavior.mvb_False);
                //FN.SetAutoManagedAttribute(ref oForm, "edtMAINCD", BoAutoManagedAttr.ama_Editable, BoAutoFormMode.afm_Add, BoModeVisualBehavior.mvb_True);

            }
            catch (Exception ex)
            {

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

        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:100,代码来源:KIS_TR0021F_HRD.cs

示例6: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // '// ADD YOUR ACTION CODE HERE ...

            try
            {
                #region Form Setting

                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                #endregion

                #region ComboBox

                string sql = string.Empty;

                // 간행물
                oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboPUBLICA").Specific;
                FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SD01' AND U_USEYN = 'Y'", "cboPUBLICA", FN.Enum_WholeTp.m_TotalTxt);
                #endregion

                #region EditText

                //코스트센터
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "CardType";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "C";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtCARDCD", "CardCode", BoFormItemTypes.it_EDIT, oCons);

                #endregion

                #region Default

                oForm.DataSources.UserDataSources.Item("optTYPE").ValueEx = "Y";
                oForm.DataSources.UserDataSources.Item("edtDATE").ValueEx = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd");

                #endregion

                #region Grid

                oForm.DataSources.DataTables.Add("grd");
                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_NotSupported;
                oGrid.DataTable = oForm.DataSources.DataTables.Item("grd"); //데이터 그리드에 Display      

                SetGridTitle(oForm);

                #endregion

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:71,代码来源:KIS_SD0160F_HRD.cs

示例7: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // ADD YOUR ACTION CODE HERE ...
            try
            {

                #region Form

                oForm.SupportedModes = -1;
                oForm.Settings.EnableRowFormat = false;//서식설정
                oForm.Settings.Enabled = false;//기본서식
                oForm.AutoManaged = true;
                if (oForm.Mode != BoFormMode.fm_ADD_MODE && oForm.Mode != BoFormMode.fm_VIEW_MODE)
                {
                    oForm.Mode = BoFormMode.fm_ADD_MODE;
                }

                oForm.DataBrowser.BrowseBy = "edtDOCNUM";

                #endregion

                SAPbouiCOM.DBDataSource oKIS_SD0070T_HRD = oForm.DataSources.DBDataSources.Item("@KIS_SD0070T_HRD");

                //문서번호
                oKIS_SD0070T_HRD.SetValue("DocEntry", 0, FN.GetNextDocEntry("KIS_SD0070_HRD"));

                //전기일
                oKIS_SD0070T_HRD.SetValue("U_DOCDT", 0, Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd"));

                #region EditText

                //담당부서
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;
                oCon = oCons.Add();
                oCon.Alias = "Active";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                oCon = null;
                oCons = null;
                
                //대행사
                #region BusinessPartner Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "CardType";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "S";//공급업체

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "frozenFor";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPCD", "CardCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPNM", "CardName", BoFormItemTypes.it_EDIT, oCons);

                //관리계정
                #region BusinessPartner Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                //자산계정이이고
                oCon.Alias = "Postable";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                //기밀이 'N'이고
                oCon = oCons.Add();
                oCon.Alias = "Protected";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SD0070A_HRD.cs

示例8: SetConditions_PRCCD

        private void SetConditions_PRCCD(ItemEvent pVal)
        {
            SAPbouiCOM.ChooseFromList oCFL;
            SAPbouiCOM.IChooseFromListEvent oCFLEvento = (SAPbouiCOM.IChooseFromListEvent)pVal;
            SAPbouiCOM.ChooseFromListCreationParams oCFLCreationParams;
            SAPbouiCOM.Conditions oCons = new SAPbouiCOM.Conditions();
            SAPbouiCOM.Condition oCon;

            try
            {
                oCFLCreationParams = (SAPbouiCOM.ChooseFromListCreationParams)B1Connections.theAppl.CreateObject(SAPbouiCOM.BoCreatableObjectType.cot_ChooseFromListCreationParams);
                oCFL = oForm.ChooseFromLists.Item(oCFLEvento.ChooseFromListUID);


                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;

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


                oCFL.SetConditions(oCons);

            }
            catch (Exception ex)
            {

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

                oCFL = null;
                oCFLEvento = null;
                oCFLCreationParams = null;
                oCons = null;
                oCon = null;
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:54,代码来源:KIS_TR0071F_HRD.cs

示例9: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting()
        {
            // '// ADD YOUR ACTION CODE HERE ...

            StringBuilder sb = new StringBuilder();
            try
            {
                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;

                }
                #endregion

                oForm.Items.Add("edtFORCUS", BoFormItemTypes.it_EDIT);//아이템 Enalbled = false 처리시 커서를 빈 텍스트 박스로 옴기기 위해 임시 아이템 추가
                SAPbouiCOM.Item oItem = (SAPbouiCOM.Item)oForm.Items.Item("edtFORCUS");
                oItem.Left = -100;
                oItem.Click();

                oForm.DataSources.UserDataSources.Item("edtDOCDTF").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
                oForm.DataSources.UserDataSources.Item("edtDOCDTT").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd");

                #region EditText

                //매출부서
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;
                oCon = oCons.Add();
                oCon.Alias = "Active";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                oCon = null;
                oCons = null;

                //영업사원
                #region SalesPersons Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "Active";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_SalesEmployee).ToString(), "edtSLPCD", "SlpCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_SalesEmployee).ToString(), "edtSLPNM", "SlpName", BoFormItemTypes.it_EDIT, oCons);

                oCon = null;
                oCons = null;

                //매출처
                #region BusinessPartner Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "CardType";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "C";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "frozenFor";
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_SD0040F_HRD.cs

示例10: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting()
        {
            // ADD YOUR ACTION CODE HERE ...
            try
            {

                #region Form

                oForm.SupportedModes = (int)BoAutoFormMode.afm_All;
                oForm.Settings.EnableRowFormat = false;//서식설정
                oForm.Settings.Enabled = false;//기본서식
                oForm.AutoManaged = true;
                if (oForm.Mode != BoFormMode.fm_FIND_MODE && oForm.Mode != BoFormMode.fm_VIEW_MODE)
                {
                    oForm.Mode = BoFormMode.fm_FIND_MODE;
                }

                oForm.DataBrowser.BrowseBy = "edtDOCNUM";

                #endregion

                SAPbouiCOM.DBDataSource oKIS_TR0041T_HRD = oForm.DataSources.DBDataSources.Item("@KIS_TR0041T_HRD");


                #region EditText


                //코스트센터
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;

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

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                //출금계좌
                #region HouseBankAccounts


                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCOUNT", "Account", BoFormItemTypes.it_EDIT, null);
                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCTCD", "GLAccount", BoFormItemTypes.it_EDIT, null);

                #endregion

                #region ComboBox

                ////문서상태
                //SAPbouiCOM.ComboBox oCombo = oForm.Items.Item("cboSTATUS").Specific;
                //FN.SetComboBoxValidValues(oForm, "SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SD04' ", "cboSTATUS", FN.Enum_WholeTp.m_Nothing);
                //if (oCombo.ValidValues.Count > 0)
                //{
                //    oForm.DataSources.UserDataSources.Item("cboSTATUS").Value = oCombo.ValidValues.Item(0).Value;
                //}

                //사업장
                SAPbouiCOM.ComboBox oCombo = oForm.Items.Item("cboBPLID").Specific;
                FN.SetComboBoxValidValues(oForm, "SELECT BPLID,BPLName FROM [OBPL] ORDER BY 1 ASC", "cboBPLID", FN.Enum_WholeTp.m_Nothing);
                //if (oCombo.ValidValues.Count > 0)
                //{
                //    oKIS_TR0041T_HRD.SetValue("U_BPLID", 0, oCombo.ValidValues.Item(0).Value);
                //}

                #endregion

                #region Grid
                SAPbouiCOM.Grid oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd1").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_NotSupported;

                #endregion


                ////문서상태 정의
                //SetcboSTATUS();


//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_TR0041A_HRD.cs

示例11: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // '// ADD YOUR ACTION CODE HERE ...
            try
            {
                #region Form Setting

                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                #endregion

                #region ComboBox

                string sql = string.Empty;

                // 사업장
                oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboBPLID").Specific;
                FN.SetComboBoxValidValues(oForm, " SELECT BPLId,BPLName FROM OBPL ORDER BY BPLId ", "cboBPLID", FN.Enum_WholeTp.m_TotalTxt);
                oComboBox.Select(1, BoSearchKey.psk_Index);

                // 문서상태
                oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboSTATUS").Specific;
                oComboBox.ValidValues.Add("", "전체");
                oComboBox.ValidValues.Add("O", "미결");
                oComboBox.ValidValues.Add("C", "마감");
                oComboBox.Select(0, BoSearchKey.psk_Index);

                #endregion

                #region ChooseFromList

                SAPbouiCOM.Conditions oCons = new Conditions();

                // USER
                #region User Conditions
                oCons = new Conditions();
                SAPbouiCOM.Condition oCon = oCons.Add();

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtBTFCRE", "USER_CODE", BoFormItemTypes.it_EDIT);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_User).ToString(), "edtAPPR", "USER_CODE", BoFormItemTypes.it_EDIT);
                #endregion 
                
                // 계정코드
                #region GLAccounts Conditions
                oCons = new Conditions();
                oCon = oCons.Add();
              
                oCon.Alias = "Postable";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtACCTCDF", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_GLAccounts).ToString(), "edtACCTCDT", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
                #endregion

                // 코스트센터
                #region ProfitCenter Conditions
                oCons = new Conditions();
                oCon = oCons.Add();

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtHPRCF", "PrcCode", BoFormItemTypes.it_EDIT);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtHPRCT", "PrcCode", BoFormItemTypes.it_EDIT);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtLPRCF", "PrcCode", BoFormItemTypes.it_EDIT);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtLPRCT", "PrcCode", BoFormItemTypes.it_EDIT);
                #endregion

                #endregion

                #region grd
                oForm.DataSources.DataTables.Add("grd");
                oGrid = (SAPbouiCOM.Grid)oForm.Items.Item("grd").Specific;
                oGrid.SelectionMode = BoMatrixSelect.ms_Single;
                SetGridTitle(oForm);
                #endregion

                #region default
                DateTime dateDoc = DateTime.Today;

                string strDate = " SELECT  DATEADD(DD,-1,DATEADD(MM, 1,  '" + Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01") + "')) ";
                dateDoc = Convert.ToDateTime(FN.GetRecordsetValue(strDate));

                oForm.DataSources.UserDataSources.Item("edtFDATE").ValueEx = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
                oForm.DataSources.UserDataSources.Item("edtTDATE").ValueEx = Convert.ToDateTime(dateDoc).ToString("yyyyMMdd");
                #endregion

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;
                }
            }
            catch (Exception ex)
            {
                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:100,代码来源:KIS_FI0040B_HRD.cs

示例12: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        /// <param name="oForm"></param>
        private void Act3_DefualtSetting(string pformuid = "")
        {
            try
            {
                oRS = (SAPbobsCOM.Recordset)B1Connections.diCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.BoRecordset);

                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = false;
                if (oForm.Mode != BoFormMode.fm_OK_MODE && oForm.Mode != BoFormMode.fm_VIEW_MODE)
                {
                    oForm.Mode = BoFormMode.fm_OK_MODE;
                }
                #endregion

                if (pformuid != "")
                {
                    oForm.DataSources.UserDataSources.Item("pformuid").ValueEx = pformuid;
                    SAPbouiCOM.Form pForm = (SAPbouiCOM.Form)B1Connections.theAppl.Forms.Item(pformuid);
                    pForm.DataSources.UserDataSources.Item("cformuid").ValueEx = oForm.UniqueID;
                }

                #region ComboBox

                //사업장
                FN.SetComboBoxValidValues(oForm, "SELECT BPLID,BPLName FROM [OBPL] ORDER BY 1 ASC", "cboBPLID", FN.Enum_WholeTp.m_Nothing);
                SAPbouiCOM.ComboBox oCombo = oForm.Items.Item("cboBPLID").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboBPLID").ValueEx = oCombo.ValidValues.Item(0).Value;
                }
                
                //임포트 유형
                FN.SetComboBoxValidValues(oForm, "SELECT U_RMK1,U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'TR06' AND U_USEYN = 'Y'", "cboTYPE", FN.Enum_WholeTp.m_Nothing);
                oCombo = oForm.Items.Item("cboTYPE").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboTYPE").ValueEx = oCombo.ValidValues.Item(0).Value;
                }

                #endregion

                #region EditText

                //코스트센터
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;

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

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                //코스트센터 정보
                oForm.DataSources.UserDataSources.Item("edtPRCCD").Value = FN.GetRecordsetValue("SELECT PrcCode FROM dbo.OPRC WHERE PrcCode = (SELECT TOP 1 U_RMK1 FROM [dbo].[@KIS_AD00201] WHERE Code = 'TR03' AND U_SMLCD = 'UPRCCD')"); ;
                oForm.DataSources.UserDataSources.Item("edtPRCNM").Value = FN.GetRecordsetValue("SELECT PrcName FROM dbo.OPRC WHERE PrcCode = (SELECT TOP 1 U_RMK1 FROM [dbo].[@KIS_AD00201] WHERE Code = 'TR03' AND U_SMLCD = 'UPRCCD')"); ;

                //출금계좌
                #region HouseBankAccounts


                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCOUNT", "Account", BoFormItemTypes.it_EDIT, null);
                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oHouseBankAccounts).ToString(), "edtACCTCD", "GLAccount", BoFormItemTypes.it_EDIT, null);
                //출금계좌 정보
                oForm.DataSources.UserDataSources.Item("edtACCOUNT").Value = FN.GetRecordsetValue("SELECT Account FROM dbo.DSC1 WHERE Account = (SELECT TOP 1 U_RMK1 FROM [dbo].[@KIS_AD00201] WHERE Code = 'TR03' AND U_SMLCD = 'UACCOUNT')");
                oForm.DataSources.UserDataSources.Item("edtACCTCD").Value = FN.GetRecordsetValue("SELECT GLAccount FROM dbo.DSC1 WHERE Account = (SELECT TOP 1 U_RMK1 FROM [dbo].[@KIS_AD00201] WHERE Code = 'TR03' AND U_SMLCD = 'UACCOUNT')");
                oForm.DataSources.UserDataSources.Item("edtACCTNM").Value = FN.GetRecordsetValue(string.Format("SELECT AcctName FROM dbo.OACT WHERE AcctCode = '{0}'", oForm.DataSources.UserDataSources.Item("edtACCTCD").Value));

                #endregion

                #region Validation DataTable
                StringBuilder pQuery = new StringBuilder();
                // 거래처코드
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_TR0050B_HRD.cs

示例13: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting() {
            // '// ADD YOUR ACTION CODE HERE ...
            #region Form Setting

            oForm.SupportedModes = 1;
            oForm.Settings.EnableRowFormat = false;
            oForm.Settings.Enabled = false;
            oForm.AutoManaged = true;

            #endregion

            #region ComboBox

            string sql = string.Empty;

            // 사업장
            oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboBPLID").Specific;
            FN.SetComboBoxValidValues(oForm, " SELECT BPLId,BPLName FROM OBPL ORDER BY BPLId ", "cboBPLID", FN.Enum_WholeTp.m_TotalTxt);
            oComboBox.Select(1, BoSearchKey.psk_Index);

            // 입력경로
            oComboBox = (SAPbouiCOM.ComboBox)oForm.Items.Item("cboTRANSTY").Specific;
            FN.SetComboBoxValidValues(oForm, " SELECT U_SMLCD,U_SMLNM FROM [@KIS_AD00101] WHERE Code = 'AD00' AND U_USEYN = 'Y' AND U_RMK2 <> 'N' ", "cboTRANSTY", FN.Enum_WholeTp.m_TotalTxt);

            #endregion

            #region ChooseFromList

            SAPbouiCOM.Conditions oCons = new Conditions();
            SAPbouiCOM.Condition oCon = oCons.Add();

            // 코스트센터
            #region ProfitCenter Conditions
            oCons = new Conditions();
            oCon = oCons.Add();

            FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtFRPRCCD", "PrcCode", BoFormItemTypes.it_EDIT);
            FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtTOPRCCD", "PrcCode", BoFormItemTypes.it_EDIT);

            #endregion

            #endregion

            #region default
            DateTime dateDoc = DateTime.Today;

            string strDate = " SELECT  DATEADD(DD,-1,DATEADD(MM, 1,  '" + Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01") + "')) ";
            dateDoc = Convert.ToDateTime(FN.GetRecordsetValue(strDate));

            oForm.DataSources.UserDataSources.Item("edtFRDT").ValueEx = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
            oForm.DataSources.UserDataSources.Item("edtTODT").ValueEx = Convert.ToDateTime(dateDoc).ToString("yyyyMMdd");
            #endregion

        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:57,代码来源:KIS_FI0050F_HRD.cs

示例14: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting()
        {
            // '// ADD YOUR ACTION CODE HERE ...

            StringBuilder sb = new StringBuilder();
            try
            {
                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;
                }
                #endregion

                //전기일:시작
                oForm.DataSources.UserDataSources.Item("edtSALDTF").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
                //전기일:종료
                oForm.DataSources.UserDataSources.Item("edtSALDTT").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd");

                //매출부서
                #region ProfitCenter Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                oCon.Alias = "DimCode";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "1";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCCD", "PrcCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_ProfitCenter).ToString(), "edtPRCNM", "PrcName", BoFormItemTypes.it_EDIT, oCons);

                oCon = null;
                oCons = null;

                //영업사원
                #region SalesPersons Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                oCon.Alias = "Active";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                oCon = oCons.Add();
                oCon.Alias = "Locked";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_SalesEmployee).ToString(), "edtSLPCD", "SlpCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_SalesEmployee).ToString(), "edtSLPNM", "SlpName", BoFormItemTypes.it_EDIT, oCons);

                oCon = null;
                oCons = null;


                #region ComboBox

                //간행물
                FN.SetComboBoxValidValues(oForm, "SELECT  U_SMLCD, U_SMLNM FROM [@KIS_AD00201] WHERE Code = 'SD01' ", "cboPUBLICA", FN.Enum_WholeTp.m_TotalTxt);
                SAPbouiCOM.ComboBox oCombo = oForm.Items.Item("cboPUBLICA").Specific;
                if (oCombo.ValidValues.Count > 0)
                {
                    oForm.DataSources.UserDataSources.Item("cboPUBLICA").Value = oCombo.ValidValues.Item(0).Value;
                }

                #endregion

            }
            catch (Exception ex)
            {

                B1Connections.theAppl.StatusBar.SetText(ex.Message, BoMessageTime.bmt_Short, BoStatusBarMessageType.smt_Error);
            }
        }
开发者ID:wldyd0210,项目名称:TEST,代码行数:95,代码来源:KIS_SD0190F_HRD.cs

示例15: Act3_DefualtSetting

        /// <summary>
        /// 폼(Form) 및 아이템들(Items)의 기본값으로 설정되야하는 항목들을 정의합니다.
        /// </summary>
        private void Act3_DefualtSetting()
        {
            // '// ADD YOUR ACTION CODE HERE ...

            StringBuilder sb = new StringBuilder();
            try
            {
                #region Form
                oForm.SupportedModes = 1;
                oForm.Settings.EnableRowFormat = false;
                oForm.Settings.Enabled = false;
                oForm.AutoManaged = true;

                foreach (SAPbouiCOM.Item item in oForm.Items)
                {
                    item.AffectsFormMode = false;

                }
                #endregion

                oForm.Items.Add("edtFORCUS", BoFormItemTypes.it_EDIT);//아이템 Enalbled = false 처리시 커서를 빈 텍스트 박스로 옴기기 위해 임시 아이템 추가
                SAPbouiCOM.Item oItem = (SAPbouiCOM.Item)oForm.Items.Item("edtFORCUS");
                oItem.Left = -100;
                oItem.Click();

                oForm.DataSources.UserDataSources.Item("edtDOCDTF").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMM01");
                oForm.DataSources.UserDataSources.Item("edtDOCDTT").Value = Convert.ToDateTime(B1Connections.theAppl.Company.ServerDate).ToString("yyyyMMdd");

                #region EditText

                //BP코드
                #region BusinessPartner Conditions
                SAPbouiCOM.Conditions oCons = new Conditions(); ;
                SAPbouiCOM.Condition oCon = oCons.Add();

                //oCon.Alias = "CardType";
                //oCon.Operation = BoConditionOperation.co_EQUAL;
                //oCon.CondVal = "S";//공급업체

                //oCon.Relationship = BoConditionRelationship.cr_AND;

                //oCon = oCons.Add();
                oCon.Alias = "frozenFor";
                oCon.Operation = BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPCDF", "CardCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoLinkedObject.lf_BusinessPartner).ToString(), "edtBPCDT", "CardCode", BoFormItemTypes.it_EDIT, oCons);

                //관리계정
                #region ChartOfAccounts Conditions
                oCons = new Conditions(); ;
                oCon = oCons.Add();

                //자산계정이이고
                oCon.Alias = "Postable";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                oCon.Relationship = BoConditionRelationship.cr_AND;

                //기밀이 'N'이고
                oCon = oCons.Add();
                oCon.Alias = "Protected";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;
                //비활성이 'N'
                oCon = oCons.Add();
                oCon.Alias = "FrozenFor";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                oCon.CondVal = "N";

                oCon.Relationship = BoConditionRelationship.cr_AND;
                //관리계정이이고
                oCon = oCons.Add();
                oCon.Alias = "LocManTran";
                oCon.Operation = SAPbouiCOM.BoConditionOperation.co_EQUAL;
                oCon.CondVal = "Y";

                #endregion

                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oChartOfAccounts).ToString(), "edtSHORTCD", "AcctCode", BoFormItemTypes.it_EDIT, oCons);
                FN.SetChooseFromListAdd(oForm, ((int)BoObjectTypes.oChartOfAccounts).ToString(), "edtSHORTNM", "AcctName", BoFormItemTypes.it_EDIT, oCons);

                #endregion

                #region ComboBox
                //사업장
                FN.SetComboBoxValidValues(oForm, "SELECT BPLID,BPLName FROM [OBPL] ORDER BY 1 ASC", "cboBPLID", FN.Enum_WholeTp.m_Nothing);

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

                if (oCombo.ValidValues.Count > 0)
//.........这里部分代码省略.........
开发者ID:wldyd0210,项目名称:TEST,代码行数:101,代码来源:KIS_TR0020F_HRD.cs


注:本文中的Conditions.Add方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。