public frmAnswers(Question quest) { InitializeComponent(); Q = quest; }
public static Question dgvRowIntoQuestion(DataGridViewRow dgvRow) { Question TempQuest = new Question(); TempQuest.id = int.Parse(dgvRow.Cells[1].Value.ToString()); TempQuest.question = dgvRow.Cells[2].Value.ToString(); TempQuest.anwsers = JsonConvert.DeserializeObject<List<Answer>>(dgvRow.Cells[3].Value.ToString()); TempQuest.dlevel = int.Parse(dgvRow.Cells[4].Value.ToString()); TempQuest.prive = Boolean.Parse(dgvRow.Cells[5].Value.ToString()); return TempQuest; }
public frmEdit(Question quest) { InitializeComponent(); _quest = quest; }