private void SetDataSourceFromCategoryProvider() { ods.TypeName = typeof(CustomerDAC).FullName; ods.EnablePaging = true; ods.SelectParameters.Clear(); ods.SelectParameters.Add("categoryID", CategoryID.ToString()); ods.SelectParameters.Add("providerID", ProviderID.ToString()); ods.SelectParameters.Add("stFrom", dtFrom.ToString()); ods.SelectParameters.Add("stTo", dtTo.ToString()); ods.SelectParameters.Add("ageFrom", AgeFrom.ToString()); ods.SelectParameters.Add("ageTo", AgeTo.ToString()); ods.SelectParameters.Add("suburbID", SuburbID.ToString()); ods.SelectParameters.Add("MonFilter", MonFilter.ToString()); ods.SelectParameters.Add("TueFilter", TueFilter.ToString()); ods.SelectParameters.Add("WedFilter", WedFilter.ToString()); ods.SelectParameters.Add("ThursFilter", ThursFilter.ToString()); ods.SelectParameters.Add("FriFilter", FriFilter.ToString()); ods.SelectParameters.Add("SatFilter", SatFilter.ToString()); ods.SelectParameters.Add("SunFilter", SunFilter.ToString()); ods.SelectMethod = "RetrieveProviderActivities"; ods.SelectCountMethod = "RetrieveProviderActivitiesCount"; ods.MaximumRowsParameterName = "amount"; ods.StartRowIndexParameterName = "startIndex"; ods.SortParameterName = "sortExpression"; GridViewActivities.PageSize = PageSize; GridViewActivities.DataSourceID = "ods"; SortProducts(); //DataPager1.SetPageProperties(StartRow, DataPager1.MaximumRows, false); //ListViewProducts.DataBind(); }
private void SetDataSourcebySearchKey(String SearchPhrase) { ods.TypeName = typeof(CustomerDAC).FullName; ods.EnablePaging = true; ods.SelectParameters.Clear(); ods.SelectParameters.Add("searchKey", SearchPhrase); ods.SelectParameters.Add("providerID", ProviderID.ToString()); ods.SelectParameters.Add("ageFrom", AgeFrom.ToString()); ods.SelectParameters.Add("ageTo", AgeTo.ToString()); ods.SelectParameters.Add("stFrom", dtFrom.ToString()); ods.SelectParameters.Add("stTo", dtTo.ToString()); ods.SelectParameters.Add("tmFrom", tmFrom.ToString()); ods.SelectParameters.Add("tmTo", tmTo.ToString()); ods.SelectParameters.Add("suburbID", SuburbID.ToString()); ods.SelectParameters.Add("categoryID", CategoryID.ToString()); ods.SelectParameters.Add("MonFilter", MonFilter.ToString()); ods.SelectParameters.Add("TueFilter", TueFilter.ToString()); ods.SelectParameters.Add("WedFilter", WedFilter.ToString()); ods.SelectParameters.Add("ThursFilter", ThursFilter.ToString()); ods.SelectParameters.Add("FriFilter", FriFilter.ToString()); ods.SelectParameters.Add("SatFilter", SatFilter.ToString()); ods.SelectParameters.Add("SunFilter", SunFilter.ToString()); ods.SelectMethod = "RetrieveProviderActivitiesbySearchPhrase"; ods.SelectCountMethod = "RetrieveProviderActivitiesbySearchPhraseCount"; ods.MaximumRowsParameterName = "amount"; ods.StartRowIndexParameterName = "startIndex"; ods.SortParameterName = "sortExpression"; ListViewActivities.DataSourceID = "ods"; SortProducts(); }