Exemple #1
0
        private void ListAbsecense()

        {
            AbsenceImplementation = new AbsenceImplementation();
            var query = (from ab in AbsenceImplementation.GetAbsences()
                         select new
            {
                ab.Id,
                ab.NombreEmpleado,
                ab.ApellidosEmpleado,
                DescTipoPermiso = ab.AbsenceType.Descripcion,
                ab.FechaPermiso
            }).AsEnumerable();


            ViewState["Permisos"] = ConverTable.LINQToDataTable(query);
            gvPermisos.DataSource = ViewState["Permisos"];
            gvPermisos.DataBind();
        }
Exemple #2
0
        private void Absence()

        {
            if (Session["Id"] != null)
            {
                int Id         = int.Parse(Session["Id"].ToString());
                var tblTarifas = new DataTable();
                Absences = AbsenceImplementation.GetAbsences().Where(a => a.Id == Id).FirstOrDefault();
                //ConverTable.LINQToDataTable(AbsenceImplementation.GetAbsences().Where(a=>a.Id== Id));

                if (Absences != null)
                {
                    TbxName.Text     = Absences.NombreEmpleado;
                    TbxLastName.Text = Absences.ApellidosEmpleado;
                    AbsenceDate.Text = string.Format("{0:0:yyyy-MM-dd}", Absences.FechaPermiso.ToShortDateString());
                    ddlapbsencetaype.SelectedValue = Absences.TipoPermiso.ToString();
                }
            }
            else
            {
                Session["Id"] = null;
            }
        }