Esempio n. 1
0
        public bool InsertarJusticante(TblJustificante _TBL_Just)
        {
            bool respuesta = false;

            try
            {
                contexto.TblJustificante.InsertOnSubmit(_TBL_Just);
                contexto.SubmitChanges();
                respuesta = true;
            }
            catch (Exception ex)
            {
                System.Console.WriteLine(ex.ToString());
                respuesta = false;
            }
            return(respuesta);
        }
Esempio n. 2
0
        protected void Button2_Click(object sender, EventArgs e)
        {
            if (FileUPArchivo.HasFile)
            {
                string path = Server.MapPath("~/images/AlumRegistrado/" + FileUPArchivo.FileName);
                FileUPArchivo.SaveAs(path);

                DateTime fechact = DateTime.Now;

                TblJustificante just = new TblJustificante();
                just.strMotivo  = txtMotivo.Text.ToUpper();
                just.fechaJusti = DateTime.Parse(fechajus.Text);
                just.strArchivo = path;
                just.fecha      = fechact;
                ControllerAlumno ctrlAlum = new ControllerAlumno();
                ctrlAlum.InsertarJusticante(just);
            }
            this.Response.Redirect("./PrincipalAlumno.aspx", true);
        }