コード例 #1
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String sid1, System.String sid2, System.Int32 cid1, System.String cid2)
        {
            esParameters parms = new esParameters();

            parms.Add("Sid1", sid1);                        parms.Add("Sid2", sid2);                        parms.Add("Cid1", cid1);                        parms.Add("Cid2", cid2);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #2
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 orderID, System.Int32 productID)
        {
            esParameters parms = new esParameters();

            parms.Add("OrderID", orderID);                  parms.Add("ProductID", productID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #3
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 employeeID, System.Int32 referredID)
        {
            esParameters parms = new esParameters();

            parms.Add("EmployeeID", employeeID);                    parms.Add("ReferredID", referredID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #4
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String registrationNo, System.String patientID)
        {
            esParameters parms = new esParameters();

            parms.Add("RegistrationNo", registrationNo);                     parms.Add("PatientID", patientID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #5
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String userGroupID, System.String programID)
        {
            esParameters parms = new esParameters();

            parms.Add("UserGroupID", userGroupID);                   parms.Add("ProgramID", programID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #6
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String keySub, System.Int32 keyId)
        {
            esParameters parms = new esParameters();

            parms.Add("KeySub", keySub);                    parms.Add("KeyId", keyId);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #7
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 shippingServiceId, System.String name)
        {
            esParameters parms = new esParameters();

            parms.Add("ShippingServiceId", shippingServiceId);                      parms.Add("Name", name);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #8
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 orderId, System.String couponCode)
        {
            esParameters parms = new esParameters();

            parms.Add("OrderId", orderId);                  parms.Add("CouponCode", couponCode);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #9
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String customerID, System.String customerTypeID)
        {
            esParameters parms = new esParameters();

            parms.Add("CustomerID", customerID);                    parms.Add("CustomerTypeID", customerTypeID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #10
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 childId, System.Int32 parentKeyId, System.String parentKeySub)
        {
            esParameters parms = new esParameters();

            parms.Add("ChildId", childId);                  parms.Add("ParentKeyId", parentKeyId);                  parms.Add("ParentKeySub", parentKeySub);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #11
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 productId, System.Int32 relatedProductId)
        {
            esParameters parms = new esParameters();

            parms.Add("ProductId", productId);                      parms.Add("RelatedProductId", relatedProductId);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #12
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String s1, System.String s2)
        {
            esParameters parms = new esParameters();

            parms.Add("S1", s1);                    parms.Add("S2", s2);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #13
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 storeId, System.Int16 paymentProviderId, System.String name)
        {
            esParameters parms = new esParameters();

            parms.Add("StoreId", storeId);                  parms.Add("PaymentProviderId", paymentProviderId);                      parms.Add("Name", name);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #14
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 storeId, System.String countryCode, System.String region)
        {
            esParameters parms = new esParameters();

            parms.Add("StoreId", storeId);                  parms.Add("CountryCode", countryCode);                  parms.Add("Region", region);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #15
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 storeId, System.Int16 emailTemplateId)
        {
            esParameters parms = new esParameters();

            parms.Add("StoreId", storeId);                  parms.Add("EmailTemplateId", emailTemplateId);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
        public int CustomExecuteNonQueryTextEsParams(string newName)
        {
            string       sqlText  = "";
            esParameters esParams = new esParameters();

            esParams.Add("FirstName", newName);
            esParams.Add("LastName", "Doe");
            esParams.Add("Salary", 27.53);

            switch (this.es.Connection.ProviderSignature.DataProviderName)
            {
            case "EntitySpaces.OracleClientProvider":
                sqlText  = "UPDATE \"MYGENERATION\".\"AggregateTest\" ";
                sqlText += "SET \"FirstName\" = :FirstName ";
                sqlText += "WHERE \"LastName\" = :LastName ";
                sqlText += "AND \"Salary\" = :Salary";

                break;

            case "EntitySpaces.NpgsqlProvider":
            case "EntitySpaces.Npgsql2Provider":
                sqlText  = "UPDATE \"AggregateTest\" ";
                sqlText += "SET \"FirstName\" = :FirstName ";
                sqlText += "WHERE \"LastName\" = :LastName ";
                sqlText += "AND \"Salary\" = :Salary";

                break;

            case "EntitySpaces.MySqlClientProvider":
                sqlText  = "UPDATE `AggregateTest` ";
                sqlText += "SET `FirstName` =  ?FirstName ";
                sqlText += "WHERE `LastName` = ?LastName ";
                sqlText += "AND `Salary` = ?Salary";

                break;

            case "EntitySpaces.SybaseSqlAnywhereProvider":
                sqlText  = "UPDATE [AggregateTest] ";
                sqlText += "SET [FirstName] =  :FirstName ";
                sqlText += "WHERE [LastName] = :LastName ";
                sqlText += "AND [Salary] = :Salary";

                break;

            default:
                sqlText  = "UPDATE [AggregateTest] ";
                sqlText += "SET [FirstName] =  @FirstName ";
                sqlText += "WHERE [LastName] = @LastName ";
                sqlText += "AND [Salary] = @Salary";

                break;
            }

            return(this.ExecuteNonQuery(esQueryType.Text, sqlText, esParams));
        }
コード例 #17
0
        public void EntityInsert(bool useES)
        {
            esParameters esParams = new esParameters();

            esParams.Add("ID", this.Id, esParameterDirection.Output,
                         DbType.Int32, 0);
            esParams.Add("DepartmentID", this.DepartmentID);
            esParams.Add("LastName", this.LastName);
            esParams.Add("FirstName", this.FirstName);
            esParams.Add("Age", this.Age);
            esParams.Add("HireDate", this.HireDate);
            esParams.Add("Salary", this.Salary);
            esParams.Add("IsActive", this.IsActive);

            if (useES)
            {
                this.ExecuteNonQuery(esQueryType.StoredProcedure,
                                     "proc_AggregateTestInsert", esParams);
            }
            else
            {
                this.ExecuteNonQuery(esQueryType.StoredProcedure,
                                     "proc_AggregateTestEntityInsert", esParams);
            }
        }
コード例 #18
0
        private bool LoadByPrimaryKeyStoredProcedure(Int32 id)
        {
            esParameters parms = new esParameters();

            parms.Add("Id", id);
            return(Load(esQueryType.StoredProcedure, es.spLoadByPrimaryKey, parms));
        }
コード例 #19
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Decimal id)
        {
            esParameters parms = new esParameters();

            parms.Add("Id", id);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #20
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 autoKey)
        {
            esParameters parms = new esParameters();

            parms.Add("AutoKey", autoKey);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #21
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Guid guidKeyAlias)
        {
            esParameters parms = new esParameters();

            parms.Add("GuidKeyAlias", guidKeyAlias);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #22
0
        public string GetFullName(int ID)
        {
            esConnection cn = this.es.Connection;

            cn.Catalog = "AggregateDb";
            cn.Schema  = "dbo";

            esParameters parms = new esParameters();

            parms.Add("ID", ID);
            parms.Add("FullName", esParameterDirection.Output, DbType.String, 40);

            this.ExecuteNonQuery(esQueryType.StoredProcedure, "proc_GetEmployeeFullName", parms);

            return(parms["FullName"].Value as string);
        }
コード例 #23
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int32 categoryID)
        {
            esParameters parms = new esParameters();

            parms.Add("CategoryID", categoryID);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #24
0
        private bool LoadByPrimaryKeyStoredProcedure(System.String versionNumber)
        {
            esParameters parms = new esParameters();

            parms.Add("VersionNumber", versionNumber);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #25
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int64 kaId)
        {
            esParameters parms = new esParameters();

            parms.Add("KA_ID", kaId);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
コード例 #26
0
        private bool LoadByPrimaryKeyStoredProcedure(System.Int64 constructorTestId)
        {
            esParameters parms = new esParameters();

            parms.Add("ConstructorTestId", constructorTestId);
            return(this.Load(esQueryType.StoredProcedure, this.es.spLoadByPrimaryKey, parms));
        }
        public int CustomExecuteNonQueryEsParams()
        {
            esParameters esParams = new esParameters();

            esParams.Add("pID", 948);

            return(this.ExecuteNonQuery(this.es.Schema, this.es.spLoadByPrimaryKey, esParams));
        }
        public int CustomExecuteNonQueryTextEsParams(string newName)
        {
            string       sqlText  = "";
            esParameters esParams = new esParameters();

            esParams.Add("FirstName", newName);
            esParams.Add("LastName", "Doe");
            esParams.Add("Salary", 27.53);

            switch (this.es.Connection.ProviderMetadataKey)
            {
            case "esOracle":
                sqlText  = "UPDATE \"MYGENERATION\".\"AggregateTest\" ";
                sqlText += "SET \"FirstName\" = :FirstName ";
                sqlText += "WHERE \"LastName\" = :LastName ";
                sqlText += "AND \"Salary\" = :Salary";

                break;

            case "esPgsql":
                sqlText  = "UPDATE \"AggregateTest\" ";
                sqlText += "SET \"FirstName\" = :FirstName ";
                sqlText += "WHERE \"LastName\" = :LastName ";
                sqlText += "AND \"Salary\" = :Salary";

                break;

            case "esMySQL":
                sqlText  = "UPDATE `AggregateTest` ";
                sqlText += "SET `FirstName` =  ?FirstName ";
                sqlText += "WHERE `LastName` = ?LastName ";
                sqlText += "AND `Salary` = ?Salary";

                break;

            default:
                sqlText  = "UPDATE [AggregateTest] ";
                sqlText += "SET [FirstName] =  @FirstName ";
                sqlText += "WHERE [LastName] = @LastName ";
                sqlText += "AND [Salary] = @Salary";

                break;
            }

            return(this.ExecuteNonQuery(esQueryType.Text, sqlText, esParams));
        }
        public void TestUpdateWithNullParams()
        {
            int          test     = 0;
            string       sqlText  = "";
            esParameters esParams = new esParameters();

            esParams.Add("DepartmentID", test);
            esParams.Add("FirstName", DBNull.Value);
            esParams.Add("LastName", "NullTest");

            sqlText  = "UPDATE [AggregateTest] ";
            sqlText += "SET [DepartmentID] = @DepartmentID, ";
            sqlText += "[FirstName] =  @FirstName ";
            sqlText += "WHERE [LastName] = @LastName";

            this.ExecuteNonQuery(esQueryType.Text, sqlText, esParams);
        }
コード例 #30
0
        //public Int32? NewId
        //{
        //    get
        //    {
        //        return base.GetSystemInt32("NewId");
        //    }
        //    set
        //    {
        //        base.SetSystemInt32("NewId", value);
        //    }
        //}

        //public int? OrderIndex
        //{
        //    get
        //    {
        //        return base.GetSystemInt32("OrderIndex");
        //    }
        //    set
        //    {
        //        if (this.RowState == esDataRowState.Unchanged)
        //        {
        //            base.SetSystemInt32("OrderIndex", value);
        //            this.AcceptChanges();
        //        }
        //        else
        //        {
        //            base.SetSystemInt32("OrderIndex", value);
        //        }
        //    }
        //}

        public bool CustomLoadSP(int aggId)
        {
            esParameters esParams = new esParameters();

            esParams.Add("pId", aggId);
            return(this.Load(esQueryType.StoredProcedure,
                             "ESAGGREGATETESTLOADBYPK", esParams));
        }