public frmAddProductRecord(frmProductRecords frmSup, clsProductRecord productRecord) { InitializeComponent(); frmListProductRecord = frmSup; if (productRecord != null) { txtID.Text = Convert.ToString(productRecord.ID); txtSerialNo_IMEI.Text = productRecord.SerialNo_IMEI; cmbSupplierName.SelectedItem = productRecord.SupplierId; cmbDeviceName.SelectedItem = productRecord.DeviceId; txtPrice.Text = productRecord.Price.ToString("F"); dateTimePicker1.Value = productRecord.DateBought; txtDescription.Text = productRecord.Description; txtStatus.Text = productRecord.Status; chkReturned.Checked = productRecord.Returned; btnAdd.Text = "Edit"; } loadDevices(productRecord); loadSuppliers(productRecord); }
private void btnPhoneStock_Click(object sender, EventArgs e) { frmProductRecords phoneRecord = new frmProductRecords(); phoneRecord.Show(); }