Exemplo n.º 1
0
        private void Buscar_Usuario()
        {
            DataTable Dt;

            CRUD_BIS.DATOS.DATOS_USUARIO Duser = new CRUD_BIS.DATOS.DATOS_USUARIO();

            Dt = Duser.Buscar_Usuario(this.txt_Buscar.Text);

            this.DGV_Listado.DataSource = Dt;

            CRUD_BIS.LOGICA.TAM_DT Formato1 = new CRUD_BIS.LOGICA.TAM_DT();

            Formato1.MultiLinea(this.DGV_Listado);
        }
Exemplo n.º 2
0
        private void Mostrar_Usuario()
        {
            DataTable Dt;

            CRUD_BIS.DATOS.DATOS_USUARIO ShowUser = new CRUD_BIS.DATOS.DATOS_USUARIO();

            Dt = ShowUser.Mostrar_Usuario();

            this.DGV_Listado.DataSource = Dt;

            CRUD_BIS.LOGICA.TAM_DT Formato1 = new CRUD_BIS.LOGICA.TAM_DT();

            Formato1.MultiLinea(this.DGV_Listado);
        }
Exemplo n.º 3
0
        private void DGV_Listado_CellClick(object sender, DataGridViewCellEventArgs e)
        {
            ID_Usuario = Convert.ToInt32(this.DGV_Listado.SelectedCells[2].Value.ToString());

            if (e.ColumnIndex == this.DGV_Listado.Columns["Borrar"].Index)
            {
                DialogResult Resp;

                Resp = MessageBox.Show("¿Desea eliminar este registro?", "Eliminado registro", MessageBoxButtons.OKCancel, MessageBoxIcon.Question);

                if (Resp == DialogResult.OK)
                {
                    Eliminar_Usuario();

                    Mostrar_Usuario();
                }
            }

            if (e.ColumnIndex == this.DGV_Listado.Columns["Editar"].Index)
            {
                this.txt_Nombre.Text = this.DGV_Listado.SelectedCells[3].Value.ToString();

                this.txt_Pass.Text = this.DGV_Listado.SelectedCells[4].Value.ToString();

                this.pic_Foto.BackgroundImage = null;

                byte[] b = (byte[])this.DGV_Listado.SelectedCells[5].Value;

                MemoryStream Ms = new MemoryStream(b);

                this.pic_Foto.Image = Image.FromStream(Ms);


                this.pnl_Menu2.Visible = true;

                this.lbl_Titulo.Text = "MODIFICAR USUARIO";

                this.tableLayoutPanel1.Controls.Remove(this.btn_Guardar);

                this.tableLayoutPanel1.Controls.Add(this.btn_GuardarCambio, 4, 0);

                CRUD_BIS.LOGICA.TAM_DT Diseño = new CRUD_BIS.LOGICA.TAM_DT();

                Diseño.CentrarTopControl(this.pnl_Menu1);
            }
        }
Exemplo n.º 4
0
        private void FORM_FIREBASE_Load(object sender, EventArgs e)
        {
            CRUD_BIS.LOGICA.TAM_DT Formato1 = new CRUD_BIS.LOGICA.TAM_DT();

            Formato1.CentrarControl(this.Pnl_Header3);

            Formato1.CentrarControl(this.panel4);


            try
            {
                Cliente1 = new FireSharp.FirebaseClient(FCon_);
            }
            catch (Exception ex)
            {
                MessageBox.Show(ex.Message);
            }

            this.Cmb_SearchBy.SelectedIndex = 0;
        }
Exemplo n.º 5
0
        private void btn_Agregar_Click(object sender, EventArgs e)
        {
            this.pnl_Menu2.Visible = true;

            this.lbl_Titulo.Text = "AGREGAR USUARIO";

            this.tableLayoutPanel1.Controls.Remove(this.btn_GuardarCambio);

            this.tableLayoutPanel1.Controls.Add(this.btn_Guardar, 4, 0);

            this.pic_Foto.Image = CRUD_BIS.Properties.Resources.Foto_Aqui_2;

            this.txt_Nombre.Clear();

            this.txt_Pass.Clear();

            this.txt_Nombre.Focus();

            CRUD_BIS.LOGICA.TAM_DT Diseño = new CRUD_BIS.LOGICA.TAM_DT();

            Diseño.CentrarTopControl(this.pnl_Menu1);
        }