private void btbtnSaveQ_Click(object sender, EventArgs e) { //chcklstbxOptions.CheckedItems //chcklstbxOptions.CheckedItems. //List<SuiteOption> suiteOptions = dh.GetSuiteOptions(); //chcklstbxOptions.CheckedItems.GetEnumerat var list = new List <string>(); foreach (var item in chcklstbxOptions.CheckedItems) { list.Add(item.ToString()); //int i = 0; } List <SuiteOption> suiteOptions = dh.GetSuiteOptions(); var chosenSuiteOptions = suiteOptions.Where((item) => list.Contains(item.OptionName)).ToList(); int i = 0; QuoteInput qinp = new QuoteInput( edtName.Text, edtSurname.Text, edtID.Text, edtTelNumber.Text, Convert.ToInt32(cspnedtnumPatrons.Value), Convert.ToInt32(cspnedtNumdays.Value), mmAddress.Text, chosenSuiteOptions, // object this.suiteObject ); frmQuota fq = new frmQuota(qinp); fq.Show(); this.Close(); }
public Save_Quota(QuoteInput quota) { this.qInput = quota; InitializeComponent(); }