|
|
@ -1,4 +1,5 @@ |
|
|
|
using System; |
|
|
|
using AspNetFrameworkMVC.Models; |
|
|
|
|
|
|
|
using System; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.Collections.Generic; |
|
|
|
using System.IO; |
|
|
|
using System.IO; |
|
|
|
using System.Linq; |
|
|
|
using System.Linq; |
|
|
@ -64,5 +65,15 @@ namespace AspNetFrameworkMVC.Controllers |
|
|
|
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath); |
|
|
|
byte[] fileBytes = System.IO.File.ReadAllBytes(filePath); |
|
|
|
return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Zip, Path.GetFileName(filePath)); |
|
|
|
return File(fileBytes, System.Net.Mime.MediaTypeNames.Application.Zip, Path.GetFileName(filePath)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public ActionResult CheckLogin() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
string filename = Request.QueryString["username"]; |
|
|
|
|
|
|
|
string password = Request.QueryString["password"]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool success = LoginManager.CheckLogin(filename, password); |
|
|
|
|
|
|
|
ViewBag.Success = success; |
|
|
|
|
|
|
|
return View(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |