protected void SearchItems_Click(object sender, EventArgs e) { UpdatePagerSize(); if (FieldItems.DataSource != null) { var items = ((List <FieldAssociation>)FieldItems.DataSource).Where(i => i.MediaDetail.SectionTitle.Contains(SearchText.Text)).ToList(); FieldItems.DataSource = items; FieldItems.DataBind(); } //switch (Mode) //{ // case ViewMode.GridView: // { // if (FieldItems.DataSource != null) // { // var items = ((List<FieldAssociation>)FieldItems.DataSource).Where(i => i.MediaDetail.SectionTitle.Contains(SearchText.Text)).ToList(); // FieldItems.DataSource = items; // FieldItems.DataBind(); // } // break; // } // default: // { // if (Values.DataSource != null) // { // var items = ((List<FieldAssociation>)Values.DataSource).Where(i => i.MediaDetail.SectionTitle.Contains(SearchText.Text)).ToList(); // Values.DataSource = items; // Values.DataBind(); // } // break; // } //} }
public void SetCell(int x, int y, FieldItems cell) // Устанавливает Cell по X,Y { _cell[y, x] = cell; }
/// <summary> /// Конструктор по умолчанию /// </summary> public Field() { _cell = new FieldItems[HEIGHT, WIDTH]; // задаем размерность поля (массив ячеек cells) }
protected void ItemList_PageIndexChanging(object sender, System.Web.UI.WebControls.GridViewPageEventArgs e) { FieldItems.PageIndex = e.NewPageIndex; FieldItems.DataBind(); }
private void BindValues() { UpdatePagerSize(); FieldItems.DataSource = GetValue(); FieldItems.DataBind(); if (((dynamic)FieldItems.DataSource).Count > 0) { SearchPanel.Visible = true; } else { SearchPanel.Visible = false; } /*switch (Mode) * { * case ViewMode.GridView: * { * //MultiItemUploaderPanel.Visible = false; * FieldItems.Visible = true; * * FieldItems.DataSource = GetValue(); * FieldItems.DataBind(); * * if(((dynamic)FieldItems.DataSource).Count > 0) * { * SearchPanel.Visible = true; * } * else * { * SearchPanel.Visible = false; * } * * break; * } * default: * { * //MultiItemUploaderPanel.Visible = true; * FieldItems.Visible = false; * * Values.DataSource = GetValue(); * //Values.DataBind(); * * if (((dynamic)Values.DataSource).Count > 0) * { * SearchPanel.Visible = true; * } * else * { * SearchPanel.Visible = false; * } * * break; * } * }*/ ItemsToDelete.Text = "[]"; ReorderItems.Text = "[]"; }
internal void FromPivotAreaReference(PivotAreaReference par) { SetAllNull(); if (par.Field != null) { Field = par.Field.Value; } if (par.Selected != null) { Selected = par.Selected.Value; } if (par.ByPosition != null) { ByPosition = par.ByPosition.Value; } if (par.Relative != null) { Relative = par.Relative.Value; } if (par.DefaultSubtotal != null) { DefaultSubtotal = par.DefaultSubtotal.Value; } if (par.SumSubtotal != null) { SumSubtotal = par.SumSubtotal.Value; } if (par.CountASubtotal != null) { CountASubtotal = par.CountASubtotal.Value; } if (par.AverageSubtotal != null) { AverageSubtotal = par.AverageSubtotal.Value; } if (par.MaxSubtotal != null) { MaxSubtotal = par.MaxSubtotal.Value; } if (par.MinSubtotal != null) { MinSubtotal = par.MinSubtotal.Value; } if (par.ApplyProductInSubtotal != null) { ApplyProductInSubtotal = par.ApplyProductInSubtotal.Value; } if (par.CountSubtotal != null) { CountSubtotal = par.CountSubtotal.Value; } if (par.ApplyStandardDeviationInSubtotal != null) { ApplyStandardDeviationInSubtotal = par.ApplyStandardDeviationInSubtotal.Value; } if (par.ApplyStandardDeviationPInSubtotal != null) { ApplyStandardDeviationPInSubtotal = par.ApplyStandardDeviationPInSubtotal.Value; } if (par.ApplyVarianceInSubtotal != null) { ApplyVarianceInSubtotal = par.ApplyVarianceInSubtotal.Value; } if (par.ApplyVariancePInSubtotal != null) { ApplyVariancePInSubtotal = par.ApplyVariancePInSubtotal.Value; } FieldItem fi; using (var oxr = OpenXmlReader.Create(par)) { while (oxr.Read()) { if (oxr.ElementType == typeof(FieldItem)) { fi = (FieldItem)oxr.LoadCurrentElement(); // the Val property is required FieldItems.Add(fi.Val.Value); } } } }