Example #1
0
        private void btMasDetalles_Click(object sender, EventArgs e)
        {
            try
            {
                if (gvResultado.SelectedRows.Count == 1)
                {
                    Vendedor vendedor = (Vendedor)gvResultado.SelectedRows[0].DataBoundItem;

                    frmVendedor frmVendedor = new frmVendedor();
                    frmVendedor.Vendedor = vendedor;

                    frmVendedor.MdiParent = (Form)this.Parent.Parent;
                    Panel p = (Panel)this.Parent.Parent.Controls.Find("pnlMdi", true).First();
                    p.Controls.Add(frmVendedor);

                    frmVendedor.BringToFront();
                    frmVendedor.StartPosition = FormStartPosition.Manual;

                    //int width = this.Controls.Find("netBarControl1", true)[0].Width;
                    frmVendedor.Location = new Point(120, 0);
                    this.Close();
                    frmVendedor.Show();
                }
            }
            catch (Exception ex)
            {
                EmailHelper.EnviarNotificacion(ex);
                throw;
            }
        }
Example #2
0
        private void btNuevoVendedor_ItemClick(object sender, EventArgs e)
        {
            if (frmVendedor == null || frmVendedor.IsDisposed)
            {
                frmVendedor = new frmVendedor();
            }

            frmVendedor.MdiParent = this;
            frmVendedor.BringToFront();
            frmVendedor.StartPosition = FormStartPosition.Manual;

            int width = this.Controls.Find("netBarControl1", true)[0].Width;

            frmVendedor.Location = new Point(width);
            frmVendedor.Show();
        }
Example #3
0
        private void pbAgregarVendedor2_Click(object sender, EventArgs e)
        {
            if (frmVendedor == null || frmVendedor.IsDisposed)
            {
                frmVendedor = new frmVendedor();
            }

            //frmBuscarInmueble.Vendedor = this.Vendedor; Que hace aca??
            frmVendedor.MdiParent = (Form)this.Parent.Parent;
            Panel p = (Panel)this.Parent.Parent.Controls.Find("pnlMdi", true).First();

            p.Controls.Add(frmVendedor);

            frmVendedor.BringToFront();
            frmVendedor.StartPosition = FormStartPosition.Manual;

            //int width = this.Controls.Find("netBarControl1", true)[0].Width;
            frmVendedor.Location = new Point(120, 0);
            this.Close();
            frmVendedor.Show();
        }