private void AddTypeBtn_Click(object sender, EventArgs e) { TurnType type = turnTypeRepository.GetTurnType(int.Parse(TurnTypeGrid.Rows[int.Parse(TurnTypeGrid.CurrentCell.RowIndex.ToString())].Cells[0].Value.ToString())); if (type != null) { TurnType found = list.Find(t => t.Id == type.Id); if (found != null) { MessageBox.Show("این خدمت از پیش انتخاب شده است !", "خطا", MessageBoxButtons.OK); } else { list.Add(type); initItemGrid(); } } }
private void TurnTypeCombo_SelectedIndexChanged(object sender, EventArgs e) { initDoctorsGrid(); PriceLbl.Text = turnTypeRepository.GetTurnType(int.Parse(TurnTypeCombo.SelectedValue.ToString())).Price.ToString(); }