private void PopulateFeelings() { using (ProjetSGBDEntities context = new ProjetSGBDEntities()) { IQueryable <GetFeeling_Result> Feelings = context.GetFeeling(CurrentClient.Id, null); dataGridViewFeeling.DataSource = Feelings.ToList(); foreach (DataGridViewColumn column in dataGridViewFeeling.Columns) { column.Visible = false; } dataGridViewFeeling.Columns[0].Visible = true; dataGridViewFeeling.Columns[1].Visible = true; dataGridViewFeeling.Columns[2].Visible = true; } }
public void LoadFeeling(int?clientToId) { using (ProjetSGBDEntities context = new ProjetSGBDEntities()) { ClientTo = context.GetFeeling(CurrentClient.Id, null).Where(feeling => feeling.ClientId == clientToId).First(); } }
private void LoadDisliked() { using (ProjetSGBDEntities context = new ProjetSGBDEntities()) { DislikedIds = (from client in context.GetFeeling(ClientId, FeelingTypeDislike) select client.ClientId).ToList(); } }