public static FormUser Instance() { if (sForm == null) { sForm = new FormUser(); } return(sForm); }
private void usersToolStripMenuItem_Click(object sender, EventArgs e) { CloseAllChild(); Form sForm = FormUser.Instance(); sForm.MdiParent = this; sForm.Show(); sForm.Activate(); }
private void FormUser_Load(object sender, EventArgs e) { this.WindowState = FormWindowState.Maximized; sFunctions.CreateDirectory("\\@Data\\@Image"); daFormUserList = new MySqlDataAdapter("", clsConnection.CN); LoadUsers("SELECT tblusers.usercode, tblusers.fullname, tblusers.address, tblusers.email, tblusertype.typename, tblusers.status, tblusers.username FROM tblusertype RIGHT JOIN tblusers ON tblusertype.autoid = tblusers.usertype ORDER BY tblusers.autoid ASC"); publicFormUser = this; }