private void SetDataSourcebySearchKey(String SearchPhrase) { ods.TypeName = typeof(CustomerDAC).FullName; ods.EnablePaging = true; ods.SelectParameters.Clear(); ods.SelectParameters.Add("providerID", ProviderID.ToString()); ods.SelectParameters.Add("searchKey", SearchPhrase); ods.SelectParameters.Add("ageFrom", AgeFrom.ToString()); ods.SelectParameters.Add("ageTo", AgeTo.ToString()); ods.SelectParameters.Add("RewardType", RewardType.ToString()); ods.SelectParameters.Add("categoryID", CategoryID.ToString()); ods.SelectMethod = "RetrieveAdminRewardsbySearchPhrase"; ods.SelectCountMethod = "RetrieveAdminRewardsbySearchPhraseCount"; ods.MaximumRowsParameterName = "amount"; ods.StartRowIndexParameterName = "startIndex"; ods.SortParameterName = "sortExpression"; ListViewRewards.DataSourceID = "ods"; SortProducts(); }
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(); }
public FormCounsellorExperience(ExperienceLogic logic) { InitializeComponent(); List <ExperienceViewModel> list = logic.Read(null); if (list != null) { textBoxAgeFrom.Text = AgeFrom.ToString(); textBoxAgeTo.Text = AgeTo.ToString(); textBoxYears.Text = Years.ToString(); } }
private async Task SendMassage() { SelectedIsOnlineInt = SelectedIsOnline == "Online" ? 1 : 0; SelectedSexInt = SelectedSex == "Женский" ? 1 : 2; await Vk.CreateList(Count.ToString(), Town, SelectedSexInt.ToString(), AgeFrom.ToString(), AgeTo.ToString(), SelectedIsOnlineInt.ToString()); await Vk.SendMsg(Massage); }
protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { string[] WordsArray; string AgeGr; Int32 Gend; Int32 AgeFr; Int32 AgeTo; Int32 ColNo; string EventLineNoText = ""; bool UserIsSignedin = false; if (e.Row.RowType == DataControlRowType.Header) { AccessLevelText = Session["CurrentAccessLevel"].ToString(); if ((AccessLevelText == "0") || (AccessLevelText == "") || (AccessLevelText == null)) { UserIsSignedin = false; //ModifyDateTime.Visible = false; SetPrizeCermonyColumnVisible = false; } else { UserIsSignedin = true; AthleticCompetitionCRUD AthlCompCRUD = new AthleticCompetitionCRUD(); Athl_Competition AthlComp = new Athl_Competition(); if (CompCode4.Text != "") { AthlComp = AthlCompCRUD.GetCompetitionRec(CompetitionCode.Text); if (AthlComp.DisplayColumnForPrizeCeremony == 1) { SetPrizeCermonyColumnVisible = true; } } } ColNoForPrizeCeremony = GetColumnIndexByName(e.Row, "tilkynnaverdlaunaafhendingu"); } if (e.Row.RowType == DataControlRowType.DataRow) { int RowIx = e.Row.RowIndex; EventLineNoText = GridView3.DataKeys[e.Row.RowIndex].Values[1].ToString(); ColNo = GetColumnIndexByName(e.Row, "ShowCompetitors"); HyperLink hp = new HyperLink(); hp.Text = "Keppendur"; //e.Row.Cells[ColNo].Text; hp.NavigateUrl = "UpdateEventResults.aspx?Event=" + EventLineNoText; e.Row.Cells[ColNo].Controls.Add(hp); ColNo = GetColumnIndexByName(e.Row, "Aldursflokkur"); AgeGr = e.Row.Cells[ColNo].Text; WordsArray = AgeGr.Split(';'); Gend = Convert.ToInt32(WordsArray[0]); AgeFr = Convert.ToInt32(WordsArray[1]); AgeTo = Convert.ToInt32(WordsArray[2]); switch (Gend) { case 1: if ((AgeFr == 0) & ((AgeTo == 0) | (AgeTo == 999))) { AgeGr = "Karlar"; } else { if (AgeFr == 0) { if (AgeTo > 22) { AgeGr = "Karlar"; } else { AgeGr = "Piltar " + AgeTo.ToString() + " og yngri"; } } else { if (AgeTo == 999) { AgeGr = "Karlar " + AgeFr.ToString() + " og eldri"; } else { if (AgeFr == AgeTo) { AgeGr = "Piltar " + AgeFr.ToString(); } else { AgeGr = "Piltar " + AgeFr.ToString() + "-" + AgeTo.ToString(); } } } } break; case 2: if ((AgeFr == 0) && ((AgeTo == 0) || (AgeTo == 999))) { AgeGr = "Konur"; } else { if (AgeFr == 0) { if (AgeTo > 22) { AgeGr = "Konur"; } else { AgeGr = "Stúlkur " + AgeTo.ToString() + " og yngri"; } } else { if (AgeTo == 999) { AgeGr = "Konur " + AgeFr.ToString() + " og eldri"; } else { if (AgeFr == AgeTo) { AgeGr = "Stúlkur " + AgeFr.ToString(); } else { AgeGr = "Stúlkur " + AgeFr.ToString() + "-" + AgeTo.ToString(); } } } } break; } //e.Row.Cells[ColNo].Text = AgeGr; } if (SetPrizeCermonyColumnVisible == false) { e.Row.Cells[ColNoForPrizeCeremony].Visible = false; e.Row.Cells[ColNoForPrizeCeremony + 1].Visible = false; } }
protected void GridView3_RowDataBound(object sender, GridViewRowEventArgs e) { string[] WordsArray; string AgeGr; Int32 Gend; Int32 AgeFr; Int32 AgeTo; Int32 ColNo; if (e.Row.RowType == DataControlRowType.DataRow) { ColNo = GetColumnIndexByName(e.Row, "Aldursflokkur"); AgeGr = e.Row.Cells[ColNo].Text; WordsArray = AgeGr.Split(';'); Gend = Convert.ToInt32(WordsArray[0]); AgeFr = Convert.ToInt32(WordsArray[1]); AgeTo = Convert.ToInt32(WordsArray[2]); switch (Gend) { case 1: if ((AgeFr == 0) & ((AgeTo == 0) | (AgeTo == 999))) { AgeGr = "Karlar"; } else { if (AgeFr == 0) { if (AgeTo > 22) { AgeGr = "Karlar"; } else { AgeGr = "Piltar " + AgeTo.ToString() + " og yngri"; } } else { if (AgeTo == 999) { AgeGr = "Karlar " + AgeFr.ToString() + " og eldri"; } else { if (AgeFr == AgeTo) { AgeGr = "Piltar " + AgeFr.ToString(); } else { AgeGr = "Piltar " + AgeFr.ToString() + "-" + AgeTo.ToString(); } } } } break; case 2: if ((AgeFr == 0) && ((AgeTo == 0) || (AgeTo == 999))) { AgeGr = "Konur"; } else { if (AgeFr == 0) { if (AgeTo > 22) { AgeGr = "Konur"; } else { AgeGr = "Stúlkur " + AgeTo.ToString() + " og yngri"; } } else { if (AgeTo == 999) { AgeGr = "Konur " + AgeFr.ToString() + " og eldri"; } else { if (AgeFr == AgeTo) { AgeGr = "Stúlkur " + AgeFr.ToString(); } else { AgeGr = "Stúlkur " + AgeFr.ToString() + "-" + AgeTo.ToString(); } } } } break; } e.Row.Cells[ColNo].Text = AgeGr; } }