/// <summary> /// 取得單筆ISO申請明細 /// </summary> /// <param name="id"></param> /// <returns></returns> public IsoMain GetIsoAppDocumentByID(int id) { List <IsoMain> isoList = this.GetIsoAppListByUserID(HttpContext.Current.User.Identity.Name); IsoMain result = isoList.Where(o => o.ID == id).FirstOrDefault(); return(result); }
/// <summary> /// 申請ISO號碼 /// </summary> /// <returns></returns> public int APPIsoNumber() { IsoMain iso = new IsoMain() { APP_ST = IsoStatus.W.ToString(), APP_UP_DT = DateTime.UtcNow.AddHours(8), APP_DT = DateTime.UtcNow.AddHours(8), APP_USR = HttpContext.Current.User.Identity.Name, }; try { this.DB.IsoMain.Add(iso); this.DB.SaveChanges(); } catch (Exception ex) { throw ex; } return(iso.ID); }