public async Task Fill() { await bd.Order.LoadAsync(); foreach (var zakaz in bd.Order.Local) { Zakaz.Add(new ZakazModel().Fill(zakaz)); } }
}//end:ShowErrorMessage /// <summary> /// Reads data from dataGridView to z. /// Returns false if z would be empty after parsing. /// </summary> private bool ParseDataTable(ref Zakaz z) { foreach (DataGridViewRow r in dataGridView.Rows) { if (r.Cells["id"].Value != null && r.Cells["run"].Value != null) { z.Add(new Etyketka( (int)r.Cells["id"].Value, r.Cells["name"].Value.ToString(), (int)r.Cells["run"].Value)); } } return(z.Count > 0); }//end:ParseDataTable