using System;

using System.Data;

using System.Data.SqlClient;

using System.Security.Permissions;

 

using AutomatedArchitecture.Northwind.Br;

using AutomatedArchitecture.Northwind.Common.Entities;

using AutomatedArchitecture.Northwind.Common.Classes;

 

namespace AutomatedArchitecture.Northwind.ServiceInterface.Base {

      // require anyone using this class be authenticated (all roles are set in the Global.asax.cs file)

      [PrincipalPermission(SecurityAction.Demand, Authenticated=true)]

      public abstract class Orders_ServiceInterface_Base {

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_LookupsDataSet GetLookups() {

                  return new Orders_Br().GetLookups();

            }

 

            // only allow users with full site-wide write access or users with write access to 'Orders'

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static OperationResult Insert(Orders_InsertInputDataSet.OrdersRow rowInsert) {

                  return new Orders_Br().Insert(rowInsert);

            }

 

            // only allow users with full site-wide write access or users with write access to 'Orders'

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static OperationResult Update(Orders_UpdateInputDataSet.OrdersRow rowUpdate) {

                  return new Orders_Br().UpdateSelectedFields(rowUpdate);

            }

 

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_ViewMultipleDataSet Search(Orders_SearchInputDataSet.OrdersRow rowSearchInput) {

                  return new Orders_Br().Search(rowSearchInput);

            }

 

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_ViewDetailDataSet GetViewDetail(int intOrderID) {

                  return new Orders_Br().GetViewDetail(intOrderID);

            }

 

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_ViewFksDataSet GetViewFks(int intOrderID) {

                  return new Orders_Br().GetViewFks(intOrderID);

            }

 

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_ViewFksDataSet GetViewFks(Orders_UpdateInputDataSet.OrdersRow rowUpdateInput) {

                  return new Orders_Br().GetViewFks(rowUpdateInput);

            }

 

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="SiteWide_Write")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Read")]

            [PrincipalPermission(SecurityAction.Demand, Role="Orders_Write")]

            public static Orders_ViewFksDataSet GetViewFks(Orders_InsertInputDataSet.OrdersRow rowInsertInput) {

                  return new Orders_Br().GetViewFks(rowInsertInput);

            }

 

      }

}