protected void LoadEntity(GreenFactoryClass entity)
 {
     if (entity != null)
     {
         EntityId = entity.GreenFactoryClassId;
         Name = entity.Name;
         SortId = entity.SortId;
         Status = entity.Status;
     }
 }
        private void Save(GreenFactoryClass entity)
        {
            entity.Name = Name;            
            entity.SortId = SortId;
            entity.Status = Status;

            if (entity.GreenFactoryClassId == 0)
            {
                m_FTISService.CreateGreenFactoryClass(entity);
            }
            else
            {
                m_FTISService.UpdateGreenFactoryClass(entity);
            }

            LoadEntity(entity.GreenFactoryClassId);
        }
Esempio n. 3
0
 /// <summary>
 /// 刪除綠色工廠分類
 /// </summary>
 /// <param name="greenFactoryClass">被刪除的綠色工廠分類</param>
 public void DeleteGreenFactoryClass(GreenFactoryClass greenFactoryClass)
 {
     FTISDao.DeleteGreenFactoryClass(greenFactoryClass);
 }
Esempio n. 4
0
 /// <summary>
 /// 更新綠色工廠分類
 /// </summary>
 /// <param name="greenFactoryClass">被更新的綠色工廠分類</param>
 /// <returns>更新後的綠色工廠分類</returns>
 public GreenFactoryClass UpdateGreenFactoryClass(GreenFactoryClass greenFactoryClass)
 {
     return FTISDao.UpdateGreenFactoryClass(greenFactoryClass);
 }
Esempio n. 5
0
 /// <summary>
 /// 新增綠色工廠分類
 /// </summary>
 /// <param name="greenFactoryClass">被新增的綠色工廠分類</param>
 /// <returns>新增後的綠色工廠分類</returns>
 public GreenFactoryClass CreateGreenFactoryClass(GreenFactoryClass greenFactoryClass)
 {
     return FTISDao.CreateGreenFactoryClass(greenFactoryClass);
 }
 public void Insert()
 {
     GreenFactoryClass entity = new GreenFactoryClass();
     Save(entity);
 }