コード例 #1
0
        public TblJuntasBO GetAMeet(int id)
        {
            TblJuntasBO data = new TblJuntasBO();

            data = metodo.GetAMeet(id);
            return(data);
        }
コード例 #2
0
        public int Crear(object obj)
        {
            TblJuntasBO datos = (TblJuntasBO)obj;

            cmd.Connection = con2.establecerconexion();
            con2.AbrirConexion();
            sql = "EXEC PA_Agregar_Junta @NombreJuntas ,@FechaJunta, @HoraJunta ,@Motivo ,@FKEmpleado ,@FKProyecto";

            cmd.Parameters.AddWithValue("@NombreJuntas", datos.NombreJuntas);
            cmd.Parameters.AddWithValue("@FechaJunta", datos.FechaJunta);
            cmd.Parameters.AddWithValue("@HoraJunta", datos.HoraJunta);
            cmd.Parameters.AddWithValue("@Motivo", datos.Motivo);
            cmd.Parameters.AddWithValue("@FKEmpleado", datos.FKEmpleado);
            cmd.Parameters.AddWithValue("@FKProyecto", datos.FKProyecto);
            cmd.CommandText = sql;
            int i = cmd.ExecuteNonQuery();

            cmd.Parameters.Clear();

            if (i <= 0)
            {
                return(0);
            }
            return(1);
        }
コード例 #3
0
        public List <TblJuntasBO> MisJuntas(int id)
        {
            List <TblJuntasBO> lista = new List <TblJuntasBO>();

            sql = "SELECT * FROM TblJuntas WHERE FKEmpleado = " + id + ";";
            SqlDataAdapter da    = new SqlDataAdapter(sql, con2.establecerconexion());
            DataTable      tabla = new DataTable();

            da.Fill(tabla);
            if (tabla.Rows.Count > 0)
            {
                foreach (DataRow row in tabla.Rows)
                {
                    TblJuntasBO obj = new TblJuntasBO();
                    obj.IDJuntas     = int.Parse(row["IDJuntas"].ToString());
                    obj.NombreJuntas = row["NombreJuntas"].ToString();
                    obj.FechaJunta   = row["FechaJunta"].ToString();
                    obj.HoraJunta    = row["HoraJunta"].ToString();
                    obj.Motivo       = row["Motivo"].ToString();
                    obj.FKEmpleado   = int.Parse(row["FKEmpleado"].ToString());
                    obj.FKEmpleado   = int.Parse(row["FKEmpleado"].ToString());
                    obj.FKProyecto   = row["FKProyecto"].ToString();
                    obj.Estatus      = int.Parse(row["Estatus"].ToString());
                    obj.Lectura      = int.Parse(row["Lectura"].ToString());
                    lista.Add(obj);
                }
            }
            return(lista);
        }
コード例 #4
0
        public TblJuntasBO GetAMeet(int id)
        {
            TblJuntasBO dato = new TblJuntasBO();

            sql = "EXEC VerDetallesJuntas " + id + ";";
            SqlDataAdapter da    = new SqlDataAdapter(sql, con2.establecerconexion());
            DataTable      tabla = new DataTable();

            da.Fill(tabla);
            if (tabla.Rows.Count > 0)
            {
                foreach (DataRow row in tabla.Rows)
                {
                    dato.NombreJuntas     = row["NombreJuntas"].ToString();
                    dato.Motivo           = row["Motivo"].ToString();
                    dato.FechaJunta       = row["FechaJunta"].ToString();
                    dato.HoraJunta        = row["HoraJunta"].ToString();
                    dato.IDJuntas         = int.Parse(row["IDJuntas"].ToString());
                    dato.Estatus          = int.Parse(row["Estatus"].ToString());
                    dato.Lectura          = int.Parse(row["Lectura"].ToString());
                    dato.NombreEmpleado   = row["Nombre"].ToString();
                    dato.TelefonoEmpleado = row["TelefonoEmpleado"].ToString();
                    dato.Correo           = row["Correo"].ToString();
                }
            }
            return(dato);
        }
コード例 #5
0
        public int Sugerencia()
        {
            string      data           = Request.Form.Get("dataJunta");
            TblJuntasBO programarjunta = JsonConvert.DeserializeObject <TblJuntasBO>(data);

            programarjunta.FKEmpleado = (int)Session["ID"];
            try
            {
                int res = 0;
                res = juntas.Alta(programarjunta);
                return(res);
            }
            catch (Exception ex)
            {
                return(0);
            }
        }
コード例 #6
0
        public List <TblJuntasBO> GetMyMeetings(int id)
        {
            List <TblJuntasBO> lista = new List <TblJuntasBO>();

            sql = "SELECT a.NombreJuntas,a.Lectura ,b.NombreEmpleado, a.IDJuntas FROM TblJuntas a INNER JOIN tblEmpleado b on a.FKEmpleado=b.IDEmpleado WHERE FKEmpresa = " + id + ";";
            SqlDataAdapter da    = new SqlDataAdapter(sql, con2.establecerconexion());
            DataTable      tabla = new DataTable();

            da.Fill(tabla);
            if (tabla.Rows.Count > 0)
            {
                foreach (DataRow row in tabla.Rows)
                {
                    TblJuntasBO obj = new TblJuntasBO();
                    obj.NombreJuntas   = row["NombreJuntas"].ToString();
                    obj.Lectura        = int.Parse(row["Lectura"].ToString());
                    obj.NombreEmpleado = row["NombreEmpleado"].ToString();
                    obj.IDJuntas       = int.Parse(row["IDJuntas"].ToString());
                    lista.Add(obj);
                }
            }
            return(lista);
        }