예제 #1
0
        public void Reportar(int id_usuario, int id_gym, int id_reto, string motivo)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Reporte_Reportar) ENABLED START*/

            // Write here your custom code...

            ReporteEN  repor    = new ReporteEN();
            ReporteCEN reporcen = new ReporteCEN();
            AdminCEN   admincen = new AdminCEN();

            System.Collections.Generic.IList <AdminEN>   admin     = null;
            System.Collections.Generic.IList <int>       numadmins = null;
            System.Collections.Generic.IList <ReporteEN> listareporte;
            listareporte = reporcen.GetAll(0, 0);
            int aux = 0;

            foreach (AdminEN element in admin)
            {
                numadmins.Add(element.ID);
            }
            aux = listareporte [listareporte.Count - 1].ID;

            admin = admincen.GetAll(0, 0);

            reporcen.New_(motivo, aux + 1, id_usuario, numadmins, id_reto, id_gym);

            /*PROTECTED REGION END*/
        }
        public void HacerAdmin(int p_oid)
        {
            /*PROTECTED REGION ID(WhateverGenNHibernate.CEN.Whatever_Usuario_hacerAdmin) ENABLED START*/

            // Write here your custom code...
            AdminCEN  admincen = new AdminCEN();
            UsuarioEN usuen    = new UsuarioEN();

            usuen = GetID(p_oid);
            Destroy(p_oid);
            admincen.New_(usuen.Nombre, usuen.Seguidores, usuen.Edad, usuen.Sexo, usuen.Facebook, usuen.Instagram, usuen.Historial, usuen.Contrasena, usuen.Email, usuen.Foto);
            /*PROTECTED REGION END*/
        }