private void fillTermins() { TerminiSelect selectTermini = new TerminiSelect(); TerminiResult rez = this.menager.execute(selectTermini) as TerminiResult; if (rez.Success) { GridViewTimes.DataSource = rez.termini.ToList(); GridViewTimes.DataBind(); } }
private void fillTermini() { TerminiSelect termini = new TerminiSelect(); TerminiResult result = this.menager.execute(termini) as TerminiResult; if (result.Success) { DropDownListTermin.DataSource = result.termini; for (int i = 0; i < result.termini.Count; i++) { DropDownListTermin.DataValueField = "Id"; DropDownListTermin.DataTextField = "vreme"; } DropDownListTermin.DataBind(); } }
protected void UpdateTime_Click(object sender, EventArgs e) { Button btn = (Button)sender; if (btn != null) { int id = Convert.ToInt32(btn.CommandArgument); ButtonInsertUpdateTime.Text = "Update Time Period"; LabelTime.Text = "Update time"; TerminiSelect select = new TerminiSelect() { termin = new TerminItem { Id = id } }; TerminiResult rez = (TerminiResult)menager.execute(select); if (rez.Success) { HiddenFieldTime.Value = rez.termini[0].Id.ToString(); TextBoxTime.Text = rez.termini[0].vreme.ToString(); } } }