public PesajeSelectForm(Form parent, PesajeList list) : base(true, parent, list) { InitializeComponent(); SetView(molView.Select); DialogResult = DialogResult.Cancel; }
public override void UpdateList() { switch (_current_action) { case molAction.Add: case molAction.Copy: if (_entity == null) { return; } List.AddItem(_entity.GetInfo(false)); if (FilterType == IFilterType.Filter) { PesajeList listA = PesajeList.GetList(_filter_results); listA.AddItem(_entity.GetInfo(false)); _filter_results = listA.GetSortedList(); } break; case molAction.Edit: case molAction.Lock: case molAction.Unlock: case molAction.ChangeStateAnulado: if (_entity == null) { return; } ActiveItem.CopyFrom(_entity); break; case molAction.Delete: if (ActiveItem == null) { return; } List.RemoveItem(ActiveOID); if (FilterType == IFilterType.Filter) { PesajeList listD = PesajeList.GetList(_filter_results); listD.RemoveItem(ActiveOID); _filter_results = listD.GetSortedList(); } break; } RefreshSources(); if (_entity != null) { Select(_entity.Oid); } _entity = null; }
public PesajeMngForm(bool isModal, Form parent, PesajeList list) : base(isModal, parent, list) { InitializeComponent(); SetView(molView.Normal); // Parche para poder abrir el formulario en modo diseƱo y no perder la configuracion de columnas DatosLocal_BS = Datos; Tabla.DataSource = DatosLocal_BS; SetMainDataGridView(Tabla); Datos.DataSource = PesajeList.NewList().GetSortedList(); SortProperty = Fecha.DataPropertyName; SortDirection = ListSortDirection.Descending; }
protected override void RefreshMainData() { PgMng.Grow(string.Empty, "Pesaje"); long oid = ActiveOID; switch (DataType) { case EntityMngFormTypeData.Default: List = PesajeList.GetList(DateTime.Today.AddDays(-7), DateTime.Today, false); break; case EntityMngFormTypeData.ByParameter: _sorted_list = List.GetSortedList(); break; } PgMng.Grow(string.Empty, "Lista de Pesajes"); }
public PesajeSelectForm(Form parent) : this(parent, PesajeList.GetList(false)) { }