public static frmadmin get_instance() { if (admin_frm == null) { admin_frm = new frmadmin(); return(admin_frm); } else { return(admin_frm); } }
private void button2_Click(object sender, EventArgs e) { Myserver.Service1 server = new Myserver.Service1(); Myserver.Admin admin = server.get_admin(); if (txtadmin.Text == admin.Id) { frmadmin frm = new frmadmin(); this.Hide(); frm.Show(); txtadmin.Hide(); cmdadminId.Hide(); } else { MessageBox.Show("Invalid!"); } txtadmin.Hide(); cmdadminId.Hide(); }
private void button2_Click(object sender, EventArgs e) { Myserver.Service1 server = new Myserver.Service1(); if (txtadmin.Text == server.get_admin_id()) { txtadmin.Hide(); txtadmin.Text = "Enter Passcode!"; cmdadminId.Hide(); frmadmin frm = new frmadmin(); this.Hide(); frm.Show(); } else { MessageBox.Show("Invalid!"); } txtadmin.Hide(); txtadmin.Text = "Enter Passcode!"; cmdadminId.Hide(); }
private void cmdhome_Click(object sender, EventArgs e) { frmadmin frm = frmadmin.get_instance(); this.Hide(); frm.Show(); }