Esempio n. 1
0
        public static SignificantTradeSS.AspnetRoleCollection GetAspnetRoleCollection(Guid varUserId)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[aspnet_Roles] INNER JOIN [aspnet_UsersInRoles] ON [aspnet_Roles].[RoleId] = [aspnet_UsersInRoles].[RoleId] WHERE [aspnet_UsersInRoles].[UserId] = @UserId", AspnetUser.Schema.Provider.Name);
            cmd.AddParameter("@UserId", varUserId, DbType.Guid);
            IDataReader          rdr  = SubSonic.DataService.GetReader(cmd);
            AspnetRoleCollection coll = new AspnetRoleCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 2
0
        public static NorthwindAccess.CustomerCollection GetCustomerCollection(string varCustomerTypeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [Customers] INNER JOIN [CustomerCustomerDemo] ON [Customers].[CustomerID] = [CustomerCustomerDemo].[CustomerID] WHERE [CustomerCustomerDemo].[CustomerTypeID] = PARM__CustomerTypeID", CustomerDemographic.Schema.Provider.Name);
            cmd.AddParameter("PARM__CustomerTypeID", varCustomerTypeID, DbType.String);
            IDataReader        rdr  = SubSonic.DataService.GetReader(cmd);
            CustomerCollection coll = new CustomerCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 3
0
        public static LIS.DAL.SysUserCollection GetSysUserCollection(long varIRole)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Sys_Users] INNER JOIN [tbl_RolesForUsers] ON [Sys_Users].[FP_sBranchID] = [tbl_RolesForUsers].[FP_sBranchID] WHERE [tbl_RolesForUsers].[FP_sBranchID] = @FP_sBranchID", SysRole.Schema.Provider.Name);
            cmd.AddParameter("@FP_sBranchID", varIRole, DbType.String);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            SysUserCollection coll = new SysUserCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 4
0
        public static PMT.DAL.UserCollection GetUserCollection(int varId)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Users] INNER JOIN [ProjectAssignments] ON [Users].[ID] = [ProjectAssignments].[UserID] WHERE [ProjectAssignments].[ProjectID] = @ProjectID", Project.Schema.Provider.Name);
            cmd.AddParameter("@ProjectID", varId, DbType.Int32);
            IDataReader    rdr  = SubSonic.DataService.GetReader(cmd);
            UserCollection coll = new UserCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 5
0
        public static Northwind.TerritoryCollection GetTerritoryCollection(int varEmployeeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Territories] INNER JOIN [EmployeeTerritories] ON [Territories].[TerritoryID] = [EmployeeTerritories].[TerritoryID] WHERE [EmployeeTerritories].[EmployeeID] = @EmployeeID", Employee.Schema.Provider.Name);
            cmd.AddParameter("@EmployeeID", varEmployeeID, DbType.Int32);
            IDataReader         rdr  = SubSonic.DataService.GetReader(cmd);
            TerritoryCollection coll = new TerritoryCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 6
0
        public static Northwind.OrderCollection GetOrderCollection(int varProductID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Orders] INNER JOIN [Order Details] ON [Orders].[OrderID] = [Order Details].[OrderID] WHERE [Order Details].[ProductID] = @ProductID", Product.Schema.Provider.Name);
            cmd.AddParameter("@ProductID", varProductID, DbType.Int32);
            IDataReader     rdr  = SubSonic.DataService.GetReader(cmd);
            OrderCollection coll = new OrderCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 7
0
        public static Northwind.ProductCollection GetProductCollection(int varCategoryID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [dbo].[Products] INNER JOIN [Product_Category_Map] ON [Products].[ProductID] = [Product_Category_Map].[ProductID] WHERE [Product_Category_Map].[CategoryID] = @CategoryID", Category.Schema.Provider.Name);
            cmd.AddParameter("@CategoryID", varCategoryID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ProductCollection coll = new ProductCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 8
0
        public static NorthwindAccess.EmployeeCollection GetEmployeeCollection(string varTerritoryID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("SELECT * FROM [Employees] INNER JOIN [EmployeeTerritories] ON [Employees].[EmployeeID] = [EmployeeTerritories].[EmployeeID] WHERE [EmployeeTerritories].[TerritoryID] = PARM__TerritoryID", Territory.Schema.Provider.Name);
            cmd.AddParameter("PARM__TerritoryID", varTerritoryID, DbType.String);
            IDataReader        rdr  = SubSonic.DataService.GetReader(cmd);
            EmployeeCollection coll = new EmployeeCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 9
0
        public static AVManager.DAL.AddressCollection GetAddressCollection(int varEmployeeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Address INNER JOIN EmployeeAddress ON " +
                "Address.AddressID=EmployeeAddress.AddressID WHERE EmployeeAddress.EmployeeID=@EmployeeID", Employee.Schema.Provider.Name);

            cmd.AddParameter("@EmployeeID", varEmployeeID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            AddressCollection coll = new AddressCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 10
0
        public static AVManager.DAL.CountryRegionCollection GetCountryRegionCollection(string varCurrencyCode)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM CountryRegion INNER JOIN CountryRegionCurrency ON " +
                "CountryRegion.CountryRegionCode=CountryRegionCurrency.CountryRegionCode WHERE CountryRegionCurrency.CurrencyCode=@CurrencyCode", Currency.Schema.Provider.Name);

            cmd.AddParameter("@CurrencyCode", varCurrencyCode, DbType.String);
            IDataReader             rdr  = SubSonic.DataService.GetReader(cmd);
            CountryRegionCollection coll = new CountryRegionCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 11
0
        public static AVManager.DAL.ContactCollection GetContactCollection(int varCreditCardID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Contact INNER JOIN ContactCreditCard ON " +
                "Contact.ContactID=ContactCreditCard.ContactID WHERE ContactCreditCard.CreditCardID=@CreditCardID", CreditCard.Schema.Provider.Name);

            cmd.AddParameter("@CreditCardID", varCreditCardID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ContactCollection coll = new ContactCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 12
0
        public static AVManager.DAL.IllustrationCollection GetIllustrationCollection(int varProductModelID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Illustration INNER JOIN ProductModelIllustration ON " +
                "Illustration.IllustrationID=ProductModelIllustration.IllustrationID WHERE ProductModelIllustration.ProductModelID=@ProductModelID", ProductModel.Schema.Provider.Name);

            cmd.AddParameter("@ProductModelID", varProductModelID, DbType.Int32);
            IDataReader            rdr  = SubSonic.DataService.GetReader(cmd);
            IllustrationCollection coll = new IllustrationCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 13
0
        public static AVManager.DAL.ShiftCollection GetShiftCollection(short varDepartmentID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Shift INNER JOIN EmployeeDepartmentHistory ON " +
                "Shift.ShiftID=EmployeeDepartmentHistory.ShiftID WHERE EmployeeDepartmentHistory.DepartmentID=@DepartmentID", Department.Schema.Provider.Name);

            cmd.AddParameter("@DepartmentID", varDepartmentID, DbType.Int16);
            IDataReader     rdr  = SubSonic.DataService.GetReader(cmd);
            ShiftCollection coll = new ShiftCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 14
0
        public static AVManager.DAL.CultureCollection GetCultureCollection(int varProductDescriptionID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Culture INNER JOIN ProductModelProductDescriptionCulture ON " +
                "Culture.CultureID=ProductModelProductDescriptionCulture.CultureID WHERE ProductModelProductDescriptionCulture.ProductDescriptionID=@ProductDescriptionID", ProductDescription.Schema.Provider.Name);

            cmd.AddParameter("@ProductDescriptionID", varProductDescriptionID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            CultureCollection coll = new CultureCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
        public static MettleSystems.dashCommerce.Store.ProductCollection GetProductCollection(int varCustomizedProductDisplayTypeId)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM dashCommerce_Store_Product INNER JOIN dashCommerce_Store_CustomizedProductDisplayType_Product_Map ON " +
                "dashCommerce_Store_Product.ProductId=dashCommerce_Store_CustomizedProductDisplayType_Product_Map.ProductId WHERE dashCommerce_Store_CustomizedProductDisplayType_Product_Map.CustomizedProductDisplayTypeId=@CustomizedProductDisplayTypeId", CustomizedProductDisplayType.Schema.Provider.Name);

            cmd.AddParameter("@CustomizedProductDisplayTypeId", varCustomizedProductDisplayTypeId, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ProductCollection coll = new ProductCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 16
0
        public static AVManager.DAL.StoreCollection GetStoreCollection(int varContactTypeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Store INNER JOIN StoreContact ON " +
                "Store.CustomerID=StoreContact.CustomerID WHERE StoreContact.ContactTypeID=@ContactTypeID", ContactType.Schema.Provider.Name);

            cmd.AddParameter("@ContactTypeID", varContactTypeID, DbType.Int32);
            IDataReader     rdr  = SubSonic.DataService.GetReader(cmd);
            StoreCollection coll = new StoreCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 17
0
        public static AVManager.DAL.VendorCollection GetVendorCollection(int varAddressTypeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Vendor INNER JOIN VendorAddress ON " +
                "Vendor.VendorID=VendorAddress.VendorID WHERE VendorAddress.AddressTypeID=@AddressTypeID", AddressType.Schema.Provider.Name);

            cmd.AddParameter("@AddressTypeID", varAddressTypeID, DbType.Int32);
            IDataReader      rdr  = SubSonic.DataService.GetReader(cmd);
            VendorCollection coll = new VendorCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 18
0
        public static AVManager.DAL.SalesPersonCollection GetSalesPersonCollection(int varTerritoryID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM SalesPerson INNER JOIN SalesTerritoryHistory ON " +
                "SalesPerson.SalesPersonID=SalesTerritoryHistory.SalesPersonID WHERE SalesTerritoryHistory.TerritoryID=@TerritoryID", SalesTerritory.Schema.Provider.Name);

            cmd.AddParameter("@TerritoryID", varTerritoryID, DbType.Int32);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            SalesPersonCollection coll = new SalesPersonCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 19
0
        public static AVManager.DAL.DepartmentCollection GetDepartmentCollection(int varEmployeeID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Department INNER JOIN EmployeeDepartmentHistory ON " +
                "Department.DepartmentID=EmployeeDepartmentHistory.DepartmentID WHERE EmployeeDepartmentHistory.EmployeeID=@EmployeeID", Employee.Schema.Provider.Name);

            cmd.AddParameter("@EmployeeID", varEmployeeID, DbType.Int32);
            IDataReader          rdr  = SubSonic.DataService.GetReader(cmd);
            DepartmentCollection coll = new DepartmentCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 20
0
        public static AVManager.DAL.UnitMeasureCollection GetUnitMeasureCollection(int varVendorID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM UnitMeasure INNER JOIN ProductVendor ON " +
                "UnitMeasure.UnitMeasureCode=ProductVendor.UnitMeasureCode WHERE ProductVendor.VendorID=@VendorID", Vendor.Schema.Provider.Name);

            cmd.AddParameter("@VendorID", varVendorID, DbType.Int32);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            UnitMeasureCollection coll = new UnitMeasureCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 21
0
        public static MettleSystems.dashCommerce.Store.AttributeCollection GetAttributeCollection(int varProductId)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM dashCommerce_Store_Attribute INNER JOIN dashCommerce_Store_Product_Attribute_Map ON " +
                "dashCommerce_Store_Attribute.AttributeId=dashCommerce_Store_Product_Attribute_Map.AttributeId WHERE dashCommerce_Store_Product_Attribute_Map.ProductId=@ProductId", Product.Schema.Provider.Name);

            cmd.AddParameter("@ProductId", varProductId, DbType.Int32);
            IDataReader         rdr  = SubSonic.DataService.GetReader(cmd);
            AttributeCollection coll = new AttributeCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 22
0
        public static Data.KELENGKAPANCollection GetKELENGKAPANCollection(string varKODEPBJ)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM KELENGKAPAN INNER JOIN KELENGKAPANPBJ ON " +
                "KELENGKAPAN.KODEKELENGKAPAN=KELENGKAPANPBJ.KODEKELENGKAPAN WHERE KELENGKAPANPBJ.KODEBPJ=@KODEBPJ", PBJ.Schema.Provider.Name);

            cmd.AddParameter("@KODEBPJ", varKODEPBJ, DbType.String);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            KELENGKAPANCollection coll = new KELENGKAPANCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 23
0
        public static AVManager.DAL.ProductModelCollection GetProductModelCollection(string varCultureID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM ProductModel INNER JOIN ProductModelProductDescriptionCulture ON " +
                "ProductModel.ProductModelID=ProductModelProductDescriptionCulture.ProductModelID WHERE ProductModelProductDescriptionCulture.CultureID=@CultureID", Culture.Schema.Provider.Name);

            cmd.AddParameter("@CultureID", varCultureID, DbType.String);
            IDataReader            rdr  = SubSonic.DataService.GetReader(cmd);
            ProductModelCollection coll = new ProductModelCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 24
0
        public static AVManager.DAL.ContactTypeCollection GetContactTypeCollection(int varVendorID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM ContactType INNER JOIN VendorContact ON " +
                "ContactType.ContactTypeID=VendorContact.ContactTypeID WHERE VendorContact.VendorID=@VendorID", Vendor.Schema.Provider.Name);

            cmd.AddParameter("@VendorID", varVendorID, DbType.Int32);
            IDataReader           rdr  = SubSonic.DataService.GetReader(cmd);
            ContactTypeCollection coll = new ContactTypeCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 25
0
        public static AVManager.DAL.ProductCollection GetProductCollection(short varLocationID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Product INNER JOIN ProductInventory ON " +
                "Product.ProductID=ProductInventory.ProductID WHERE ProductInventory.LocationID=@LocationID", Location.Schema.Provider.Name);

            cmd.AddParameter("@LocationID", varLocationID, DbType.Int16);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ProductCollection coll = new ProductCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 26
0
        public static AVManager.DAL.EmployeeCollection GetEmployeeCollection(byte varShiftID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Employee INNER JOIN EmployeeDepartmentHistory ON " +
                "Employee.EmployeeID=EmployeeDepartmentHistory.EmployeeID WHERE EmployeeDepartmentHistory.ShiftID=@ShiftID", Shift.Schema.Provider.Name);

            cmd.AddParameter("@ShiftID", varShiftID, DbType.Byte);
            IDataReader        rdr  = SubSonic.DataService.GetReader(cmd);
            EmployeeCollection coll = new EmployeeCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 27
0
        public static MettleSystems.dashCommerce.Content.PageCollection GetPageCollection(int varRegionId)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM dashCommerce_Content_Page INNER JOIN dashCommerce_Content_Page_Region_Map ON " +
                "dashCommerce_Content_Page.PageId=dashCommerce_Content_Page_Region_Map.PageId WHERE dashCommerce_Content_Page_Region_Map.RegionId=@RegionId", Region.Schema.Provider.Name);

            cmd.AddParameter("@RegionId", varRegionId, DbType.Int32);
            IDataReader    rdr  = SubSonic.DataService.GetReader(cmd);
            PageCollection coll = new PageCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 28
0
        public static AVManager.DAL.CustomerCollection GetCustomerCollection(int varAddressID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Customer INNER JOIN CustomerAddress ON " +
                "Customer.CustomerID=CustomerAddress.CustomerID WHERE CustomerAddress.AddressID=@AddressID", Address.Schema.Provider.Name);

            cmd.AddParameter("@AddressID", varAddressID, DbType.Int32);
            IDataReader        rdr  = SubSonic.DataService.GetReader(cmd);
            CustomerCollection coll = new CustomerCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 29
0
        public static AVManager.DAL.ProductCollection GetProductCollection(int varProductPhotoID)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Product INNER JOIN ProductProductPhoto ON " +
                "Product.ProductID=ProductProductPhoto.ProductID WHERE ProductProductPhoto.ProductPhotoID=@ProductPhotoID", ProductPhoto.Schema.Provider.Name);

            cmd.AddParameter("@ProductPhotoID", varProductPhotoID, DbType.Int32);
            IDataReader       rdr  = SubSonic.DataService.GetReader(cmd);
            ProductCollection coll = new ProductCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 30
0
        public static AVManager.DAL.VendorCollection GetVendorCollection(string varUnitMeasureCode)
        {
            SubSonic.QueryCommand cmd = new SubSonic.QueryCommand(
                "SELECT * FROM Vendor INNER JOIN ProductVendor ON " +
                "Vendor.VendorID=ProductVendor.VendorID WHERE ProductVendor.UnitMeasureCode=@UnitMeasureCode", UnitMeasure.Schema.Provider.Name);

            cmd.AddParameter("@UnitMeasureCode", varUnitMeasureCode, DbType.String);
            IDataReader      rdr  = SubSonic.DataService.GetReader(cmd);
            VendorCollection coll = new VendorCollection();

            coll.LoadAndCloseReader(rdr);
            return(coll);
        }
Esempio n. 31
0
 private static void UpdateOrderPoint(int orderId, decimal orderPoint)
 {
     SubSonic.QueryCommand cmd = new SubSonic.QueryCommand("UPDATE ORDERS SET OrderPoint = @OrderPoint where ID=@ID");
     cmd.AddParameter("@OrderPoint", orderPoint, System.Data.DbType.Decimal);
     cmd.AddParameter("@ID", orderId, System.Data.DbType.Int32);
     SubSonic.DataService.ExecuteQuery(cmd);
 }