void eachPictureBox_Click(object sender, EventArgs e) { PictureBox picture = (PictureBox)sender; // MessageBox.Show(picture.Name.ToString()); frmShowLocation.locationId = picture.Name.ToString(); frmMainForm fmain = new frmMainForm(); // this.Hide(); frmAttendaceByLocation fattedance = new frmAttendaceByLocation(); fattedance.Top = 0; fattedance.Left = 0; //fattedance.MdiParent = fmain; fattedance.MdiParent = this.MdiParent; fattedance.Show(); }
void lblName_Click(object sender, EventArgs e) { Label lbl = (Label)sender; // MessageBox.Show(lbl.Text.ToString()); // MessageBox.Show(lbl.Name.ToString()); // conn.msgErr(btn.Name.ToString()); frmShowLocation.locationId = lbl.Name.ToString(); frmMainForm fmain = new frmMainForm(); // this.Hide(); frmAttendaceByLocation fattedance = new frmAttendaceByLocation(); this.Top = 0; this.Left = 0; fattedance.MdiParent = this.MdiParent; // fattDeatails.MdiParent = this.MdiParent; fattedance.Show(); }