Beispiel #1
0
        private void QueryWithConditions_MASTER(ref SAPbouiCOM.DBDataSource oDB, string pYYYYMM, string pCENTCD)
        {
            SAPbouiCOM.Conditions oConditions;
            SAPbouiCOM.Condition oCondition;

            oConditions = (SAPbouiCOM.Conditions)B1Connections.theAppl.CreateObject(BoCreatableObjectType.cot_Conditions);
            oCondition = oConditions.Add();
            oCondition.Alias = "U_YYYYMM";
            oCondition.Operation = BoConditionOperation.co_EQUAL;
            oCondition.CondVal = pYYYYMM;
            oCondition.Relationship = BoConditionRelationship.cr_AND;
            oCondition = oConditions.Add();
            oCondition.Alias = "U_CENTCD";
            oCondition.Operation = BoConditionOperation.co_EQUAL;
            oCondition.CondVal = pCENTCD;
            oCondition.Relationship = BoConditionRelationship.cr_AND;
            oCondition = oConditions.Add();
            oCondition.Alias = "U_BTYPE";
            oCondition.Operation = BoConditionOperation.co_EQUAL;
            oCondition.CondVal = "KIS_SO0310_HRD";
            oDB.Query(oConditions);
        }
Beispiel #2
0
        private void QueryWithConditions(ref SAPbouiCOM.DBDataSource oDB, string strAlias, string strCondVal)
        {
            SAPbouiCOM.Conditions oConditions;
            SAPbouiCOM.Condition oCondition;

            oConditions = (SAPbouiCOM.Conditions)B1Connections.theAppl.CreateObject(BoCreatableObjectType.cot_Conditions);
            oCondition = oConditions.Add();
            oCondition.Alias = strAlias;
            oCondition.Operation = BoConditionOperation.co_EQUAL;
            oCondition.CondVal = strCondVal;
            oDB.Query(oConditions);
        }
Beispiel #3
0
        private void QueryWithConditions(ref SAPbouiCOM.DBDataSource oDB, Dictionary<string, string> pDictionary)
        {
            SAPbouiCOM.Conditions oConditions = null;
            SAPbouiCOM.Condition oCondition = null;

            oConditions = (SAPbouiCOM.Conditions)B1Connections.theAppl.CreateObject(BoCreatableObjectType.cot_Conditions);
            string strCenterCd = string.Empty;
            string strBranchCd = string.Empty;
            int iLoop = 0;
            try
            {
                if (pDictionary != null)
                {
                    foreach (KeyValuePair<string, string> item in pDictionary)
                    {
                        if (iLoop > 0)
                            oCondition.Relationship = BoConditionRelationship.cr_AND;

                        oCondition = oConditions.Add();

                        switch (item.Key.ToString())
                        {
                            case "U_PAPERTP":
                                oCondition.Alias = item.Key.ToString();
                                oCondition.Operation = BoConditionOperation.co_EQUAL;
                                oCondition.CondVal = item.Value.ToString();
                                break;
                            case "U_CENTCD":
                                oCondition.Alias = item.Key.ToString();
                                oCondition.Operation = BoConditionOperation.co_EQUAL;
                                oCondition.CondVal = item.Value.ToString();
                                break;
                            case "U_BRCHCD":
                                oCondition.Alias = item.Key.ToString();
                                oCondition.Operation = BoConditionOperation.co_EQUAL;
                                oCondition.CondVal = item.Value.ToString();
                                break;
                            default:
                                break;
                        }

                        iLoop += 1;
                    }
                    oDB.Query(oConditions);
                }
            }
            catch (Exception)
            {
                throw;
            }
        }