/// <summary>
        /// Gets the stores with warehouse and cluster.
        /// </summary>
        /// <returns></returns>
        public static DataView GetStoresWithWarehouseAndCluster()
        {
            string query = HCMIS.Repository.Queries.PhysicalStore.SelectGetStoresWithWarehouseAndCluster();

            BLL.PhysicalStore phStore = new PhysicalStore();
            phStore.LoadFromRawSql(query);
            return(phStore.DefaultView);
        }
        public static System.Data.DataView LoadByItemID(int ItemID, int UserID)
        {
            string        query  = HCMIS.Repository.Queries.PhysicalStore.SelectLoadByItemID(ItemID, UserID);
            PhysicalStore stores = new PhysicalStore();

            stores.LoadFromRawSql(query);
            return(stores.DefaultView);
        }
 public static PhysicalStore GetDefaultPhysicalStoreFor(int userId)
 {
     string query =
          HCMIS.Repository.Queries.PhysicalStore.SelectGetDefaultPhysicalStoreFor(userId);
     PhysicalStore phStore = new PhysicalStore();
     phStore.LoadFromRawSql(query);
     return phStore;
 }
 public static DataView GetAllowedPhysicalStoresForUser(int userId,bool isActive = false)
 {
     string query =
           HCMIS.Repository.Queries.PhysicalStore.SelectGetAllowedPhysicalStoresForUser(userId, isActive);
     PhysicalStore phStore = new PhysicalStore();
     phStore.LoadFromRawSql(query);
     return phStore.DefaultView;
 }
        public static PhysicalStore GetDefaultPhysicalStoreFor(int userId)
        {
            string query =
                HCMIS.Repository.Queries.PhysicalStore.SelectGetDefaultPhysicalStoreFor(userId);
            PhysicalStore phStore = new PhysicalStore();

            phStore.LoadFromRawSql(query);
            return(phStore);
        }
        public static DataView GetAllowedPhysicalStoresForUser(int userId, bool isActive = false)
        {
            string query =
                HCMIS.Repository.Queries.PhysicalStore.SelectGetAllowedPhysicalStoresForUser(userId, isActive);
            PhysicalStore phStore = new PhysicalStore();

            phStore.LoadFromRawSql(query);
            return(phStore.DefaultView);
        }
        public static DataView GetWarehousesFor(int ItemID, int unitID, int activityID, int userID)
        {
            string query =
                HCMIS.Repository.Queries.PhysicalStore.SelectGetWarehousesFor(ItemID, unitID, activityID, userID);
            PhysicalStore stores = new PhysicalStore();

            stores.LoadFromRawSql(query);
            return(stores.DefaultView);
        }
 public static DataView GetStoresWithWarehouseAndCluster(int warehouseID)
 {
     string query =
         HCMIS.Repository.Queries.PhysicalStore.SelectGetStoresWithWarehouseAndCluster(warehouseID);
     BLL.PhysicalStore phStore = new PhysicalStore();
     phStore.LoadFromRawSql(query);
     return phStore.DefaultView;
 }
 public static System.Data.DataView LoadByItemID(int ItemID, int UserID)
 {
     string query = HCMIS.Repository.Queries.PhysicalStore.SelectLoadByItemID(ItemID, UserID);
     PhysicalStore stores = new PhysicalStore();
     stores.LoadFromRawSql(query);
     return stores.DefaultView;
 }
 public static DataView GetWarehousesFor(int ItemID, int unitID, int activityID,int userID)
 {
     string query =
         HCMIS.Repository.Queries.PhysicalStore.SelectGetWarehousesFor(ItemID, unitID, activityID, userID);
     PhysicalStore stores = new PhysicalStore();
     stores.LoadFromRawSql(query);
     return stores.DefaultView;
 }