Skip to content

Instantly share code, notes, and snippets.

@idthlm
idthlm / datagridview.cs
Created May 21, 2012 05:20
filling in a DataGridView through code
int cicloId = Convert.ToInt32(CicloCombo.SelectedValue);
int detalleCarreraId = Convert.ToInt32(DetalleCarreraCombo.SelectedValue);
using (var fvhDb = new FvhContextSpace.fvhDataContext())
{
var cursosAsignados = from asignacionCurso in fvhDb.AsignacionCursoCarreras
join tituloCurso in fvhDb.Cursos on asignacionCurso.IdCurso equals
tituloCurso.IdCurso
join detalle in fvhDb.DetalleCarreras on asignacionCurso.IdDetalleCarrera equals
detalle.IdDetalleCarrera
join tituloCarrera in fvhDb.Carreras on detalle.IdCarrera equals
@idthlm
idthlm / export.css
Created April 24, 2012 22:25
export data cached data
public int TrasaladarNotas()
{
int contadorNotas = 0;
using (var fvhDb = new FvhContextSpace.fvhDataContext())
{
var todasLasAreasLab = (from areas in fvhDb.AsignacionLabCursos
select areas).ToList();
var todasLasNotasLab = (from notas in fvhDb.NotaSubAreaLabs
select notas).ToList();
var todosLosLab = (from laboratorio in fvhDb.LaboratoriosPorGrados
@idthlm
idthlm / export
Created April 24, 2012 21:44
this method exports grades from laboratory sub-areas to laboratory
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace FVHInscripciones2011
{
class ClaseExportarSubAreasLab
{
public int IdCiclo { get; set; }
@idthlm
idthlm / MasterPage.html
Created February 1, 2012 21:49
this is my master page
<%@ Master Language="C#" AutoEventWireup="true" CodeBehind="Site.master.cs" Inherits="CuadrosFVH.SiteMaster" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head runat="server">
<title></title>
<link href="~/Styles/Site.css" rel="stylesheet" type="text/css" />
<asp:ContentPlaceHolder ID="HeadContent" runat="server">
</asp:ContentPlaceHolder>
@idthlm
idthlm / app.config
Created December 14, 2011 15:21
applicationconfig
<?xml version="1.0" encoding="UTF-8"?>
<!--
IIS configuration sections.
For schema documentation, see
%windir%\system32\inetsrv\config\schema\IIS_schema.xml.
Please make a backup of this file before making any changes to it.
@idthlm
idthlm / web.html
Created December 14, 2011 15:05
my web.config
<?xml version="1.0"?>
<!--
For more information on how to configure your ASP.NET application, please visit
http://go.microsoft.com/fwlink/?LinkId=169433
-->
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="PlanillaFvh.Properties.Settings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
@idthlm
idthlm / schedule.css
Created December 6, 2011 22:06
this is what I have in my enabling button
if (Page.IsValid)
{
var abuscar =Convert.ToInt32(RegimenCombo.SelectedValue);
using (var fvhDb = new FvhContext.FvhDataContext())
{
var horarios = from horario in fvhDb.Horarios
join asignacion in fvhDb.AsignacionRegimenMaestros on horario.IdAsignacionRegimenMaestro
equals asignacion.IdAsignacionRegimenMaestro
join dia in fvhDb.Dias on horario.IdDia equals dia.IdDia
where asignacion.IdAsignacionRegimenMaestro == abuscar
@idthlm
idthlm / gist:1435378
Created December 5, 2011 21:13
what I have in sites
/* DEFAULTS
----------------------------------------------------------*/
body
{
background: #b6b7bc;
font-size: .80em;
font-family: "Helvetica Neue", "Lucida Grande", "Segoe UI", Arial, Helvetica, Verdana, sans-serif;
margin: 0px;
padding: 0px;
@idthlm
idthlm / gist:1435335
Created December 5, 2011 21:04
what I got from the browser
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head><title>
Home Page
</title><link href="Styles/Site.css" rel="stylesheet" type="text/css" />
@idthlm
idthlm / timer.cs
Created December 1, 2011 21:37
simple example of a timer clock
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ControlTimbres
{
class Program
{
static void Main(string[] args)