public ActionResult AnnualReviewUpload1(AnnualReviewViewPage AnnualReviewAdd) { IAnnualReview IA = new AnnualReviewMethod(); string idd = "0"; try { idd = System.Web.HttpContext.Current.Session["UserName"].ToString(); } catch { return(Json("操作时间过长请重新登录")); } string fileSave = Server.MapPath("~/upload/"); try { HttpFileCollectionBase file = Request.Files; if (file.Count != 0) { for (int i = 0; i < file.Count; i++) { HttpPostedFileBase file2 = file[i]; if (file.AllKeys[i] == "file") { count++; string extName = Path.GetExtension(file2.FileName); string newName = Guid.NewGuid().ToString() + extName; file2.SaveAs(Path.Combine(fileSave, newName)); if (count == 1) { AnnualReviewAdd.BusinessCard = "/upload/" + newName; } else { AnnualReviewAdd.BusinessCard += "," + "/upload/" + newName; } } if (file.AllKeys[i] == "PayCard") { string extName = Path.GetExtension(file2.FileName); string newName = Guid.NewGuid().ToString() + extName; file2.SaveAs(Path.Combine(fileSave, newName)); AnnualReviewAdd.PayCard = "/upload/" + newName; } } } } catch { return(Json("文件过大", JsonRequestBehavior.AllowGet)); } return(Json(IA.AnnualReviewUpload(AnnualReviewAdd, idd), JsonRequestBehavior.AllowGet)); }
public ActionResult AnnualReview1() { IAnnualReview IA = new AnnualReviewMethod(); string idd = "0"; try { idd = System.Web.HttpContext.Current.Session["UserName"].ToString(); } catch { return(Json("操作时间过长请重新登录")); } return(Json(IA.Index(idd), JsonRequestBehavior.AllowGet)); }
public ActionResult AnnualReviewDetail1(string id) { IAnnualReview IA = new AnnualReviewMethod(); return(Json(IA.AnnualReviewDetail(id), JsonRequestBehavior.AllowGet)); }