private void dataGridView1_CellContentClick(object sender, DataGridViewCellEventArgs e) { string id = Convert.ToString(dataGridView1.CurrentRow.Cells[0].Value); //Usuario us = principal.Sirtru.buscarUsuario(id); if (principal.Sirtru.buscarUsuario(id).Tipo.Equals("c")) { principal.UsuarioActual = principal.Sirtru.buscarUsuario(id); InfoUsuarioCON info = new InfoUsuarioCON(principal); Size desk = System.Windows.Forms.SystemInformation.PrimaryMonitorSize; info.Width = (this.Width / 2) + 170; info.Height = this.Height - 68; Int32 ancho = (this.Width / 2) - 190; info.Location = new Point(ancho, 0); info.MdiParent = this; info.Show(); } else if (principal.Sirtru.buscarUsuario(id).Tipo.Equals("s")) { principal.UsuarioActual = principal.Sirtru.buscarUsuario(id); infoUsuarioSIN info = new infoUsuarioSIN(principal); Size desk = System.Windows.Forms.SystemInformation.PrimaryMonitorSize; info.Width = (this.Width / 2) + 170; info.Height = this.Height - 68; Int32 ancho = (this.Width / 2) - 190; info.Location = new Point(ancho, 0); info.MdiParent = this; info.Show(); } }
private void Visualizador_Load(object sender, EventArgs e) { if (principal.UsuarioActual.Tipo.Equals("c")) { InfoUsuarioCON con = new InfoUsuarioCON(principal); Size desk = System.Windows.Forms.SystemInformation.PrimaryMonitorSize; con.Height = this.Height - 68; con.Width = (this.Width / 2) - 200; con.MdiParent = this; con.Show(); } else { infoUsuarioSIN sin = new infoUsuarioSIN(principal); Size desk = System.Windows.Forms.SystemInformation.PrimaryMonitorSize; sin.Height = this.Height - 68; sin.Width = (this.Width / 2) - 200; sin.MdiParent = this; sin.Show(); ventaToolStripMenuItem.Visible = false; } }
private void btInfoUsuario_Click(object sender, EventArgs e) { if (principal.UsuarioActual.Tipo.Equals("c")) { InfoUsuarioCON con = new InfoUsuarioCON(principal); con.Show(); } else { infoUsuarioSIN sin = new infoUsuarioSIN(principal); sin.Show(); } }
public infoUsuarioSIN(Login prin) { principal = prin; InitializeComponent(); user = principal.UsuarioActual; markersOverlay = new GMapOverlay("Overlay"); marcadores = new GMapOverlay("Marcadores"); infoUsuarioSIN.infoS = this; }