Exemplo n.º 1
0
        // GET: AttendanceDetails
        public async Task <IActionResult> Index()
        {
            var date = DateTime.Today;

            var project1211Context1 = _context.AttendanceDetails.FirstOrDefault(a => a.CreatedDate.Value.Date == date);

            if ((HttpContext.Session.GetString("Type") == "2") && (project1211Context1 == null))
            {
                var db = new project1211Context();
                using (SqlConnection connection = new SqlConnection("Server=tcp:testserver1211.database.windows.net,1433;Initial Catalog=project1211;Persist Security Info=False;User ID=Admin123;Password=Garry@123;MultipleActiveResultSets=True;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;"))
                    using (SqlCommand command = connection.CreateCommand())
                    {
                        command.CommandText = "exec p1";


                        connection.Open();

                        command.ExecuteNonQuery();

                        connection.Close();
                    }
            }
            var project1211Context = _context.AttendanceDetails.Include(a => a.FkStud).OrderByDescending(a => a.CreatedDate);

            return(View(await project1211Context.ToListAsync()));
        }
 public MstUsersController(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 3
0
 public AdminDetailsController(project1211Context context)
 {
     _context = context;
 }
 public MstDepartmentsController(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 5
0
 public MstRolesController(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 6
0
 public MstSubjectsController(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 7
0
 public MarksDetailsController(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 8
0
 public Login(project1211Context context)
 {
     _context = context;
 }
Exemplo n.º 9
0
 public FacultyDetailsController(project1211Context context)
 {
     _context = context;
 }
 public StudentDetailsController(project1211Context context, IWebHostEnvironment hostEnvironment)
 {
     _context             = context;
     this.hostEnvironment = hostEnvironment;
 }
Exemplo n.º 11
0
 public AttendanceDetailsController(project1211Context context)
 {
     _context = context;
 }