private void ToolStripEdit_Click(object sender, EventArgs e) { var assno = this.dgvAllAssets.CurrentRow.Cells["ASSETNO"].Value.ToString(); // Get the genaral user control called usercontrol1. UserControl1 userControl1 = new UserControl1(); userControl1.PopulateControl(assno); //populate the new asset form with daa NewAsset asset = new NewAsset(); //var r = asset.Controls[3].Controls.Find("txtserial", true).ToList(); asset.PopulateControls(assno); //asset.AddOwnedForm(userControl11); asset.ShowDialog(); }
private void DgvAllAssets_CellContentClick_1(object sender, DataGridViewCellEventArgs e) { var assno = this.dgvAllAssets.CurrentRow.Cells[0].Value.ToString(); // Get the genaral user control called usercontrol1. CommonData.AssetNo = assno; UserControl1 userControl1 = new UserControl1(); userControl1.PopulateControl(assno); //populate the new asset form with daa NewAsset asset = new NewAsset(); //var r = asset.Controls[3].Controls.Find("txtserial", true).ToList(); asset.PopulateControls(assno); //asset.AddOwnedForm(userControl11); asset.ShowDialog(); }
private void DgvAllAssets_DoubleClick(object sender, EventArgs e) { //Ensure that the gridview column is not a header if (dgvAllAssets.CurrentRow.Index != -1) { var assno = this.dgvAllAssets.CurrentRow.Cells[0].Value.ToString(); CommonData.AssetNo = assno; // Get the genaral user control called usercontrol1. UserControl1 userControl1 = new UserControl1(); userControl1.PopulateControl(assno); //populate the new asset form with daa NewAsset asset = new NewAsset(); //var r = asset.Controls[3].Controls.Find("txtserial", true).ToList(); asset.PopulateControls(assno); //asset.AddOwnedForm(userControl11); asset.ShowDialog(); } }
private void OpenAssetPage() { NewAsset asset = new NewAsset(); asset.ShowDialog(); }