private void btnAdd_Click(object sender, EventArgs e) { clsAndroidPhone androidPhone = new clsAndroidPhone("", "", "Android", DateTime.Now, 0, clsMobilePhone.Condition.good); frmAdd addAndroid = new frmAdd(androidPhone); DialogResult dr = addAndroid.ShowDialog(); if (dr == DialogResult.OK) { phoneLot.AddPhone(addAndroid.AndroidPhoneDetails); DisplayPhone(); } }
public frmAdd(clsAndroidPhone phone) { InitializeComponent(); this.AndroidPhoneDetails = phone; isAndroid = true; }