protected void LoadEntity(Curriculum entity) { if (entity != null) { EntityId = entity.CurriculumId; Name = entity.Name; SortId = entity.SortId; Status = entity.Status; PostDate = entity.PostDate; Content = entity.Content; Pic1 = entity.Pic1; Pic1Name = entity.Pic1Name; Pic2 = entity.Pic2; Pic2Name = entity.Pic2Name; Pic3 = entity.Pic3; Pic3Name = entity.Pic3Name; AFile1 = entity.AFile1; AFile1Name = entity.AFile1Name; AFile2 = entity.AFile2; AFile2Name = entity.AFile2Name; AFile3 = entity.AFile3; AFile3Name = entity.AFile3Name; AUrl1 = entity.AUrl1; AUrl2 = entity.AUrl2; AUrl3 = entity.AUrl3; IsNew = entity.IsNew; Vister = entity.Vister; MainCode = entity.MainCode; MainName = entity.MainName; AdminCode = entity.AdminCode; AdminName = entity.AdminName; ServiceCode = entity.ServiceCode; ServiceName = entity.ServiceName; } }
/// <summary> /// 刪除課程講義 /// </summary> /// <param name="curriculum">被刪除的課程講義</param> public void DeleteCurriculum(Curriculum curriculum) { FTISDao.DeleteCurriculum(curriculum); }
/// <summary> /// 更新課程講義 /// </summary> /// <param name="curriculum">被更新的課程講義</param> /// <returns>更新後的課程講義</returns> public Curriculum UpdateCurriculum(Curriculum curriculum) { return FTISDao.UpdateCurriculum(curriculum); }
/// <summary> /// 新增課程講義 /// </summary> /// <param name="curriculum">被新增的課程講義</param> /// <returns>新增後的課程講義</returns> public Curriculum CreateCurriculum(Curriculum curriculum) { return FTISDao.CreateCurriculum(curriculum); }
private void Save(Curriculum entity) { entity.Name = Name; entity.SortId = SortId; entity.Status = Status; entity.PostDate = PostDate; entity.Content = Content; entity.Pic1 = Pic1; entity.Pic1Name = Pic1Name; entity.Pic2 = Pic2; entity.Pic2Name = Pic2Name; entity.Pic3 = Pic3; entity.Pic3Name = Pic3Name; entity.AFile1 = AFile1; entity.AFile1Name = AFile1Name; entity.AFile2 = AFile2; entity.AFile2Name = AFile2Name; entity.AFile3 = AFile3; entity.AFile3Name = AFile3Name; entity.AUrl1 = AUrl1; entity.AUrl2 = AUrl2; entity.AUrl3 = AUrl3; entity.IsNew = IsNew; entity.Vister = Vister; entity.MainCode = MainCode; entity.MainName = MainName; entity.AdminCode = AdminCode; entity.AdminName = AdminName; entity.ServiceCode = ServiceCode; entity.ServiceName = ServiceName; if (entity.CurriculumId == 0) { m_FTISService.CreateCurriculum(entity); } else { m_FTISService.UpdateCurriculum(entity); } LoadEntity(entity.CurriculumId); }
public void Insert() { Curriculum entity = new Curriculum(); Save(entity); }