예제 #1
0
 public void Delete(OperationalPlanEntity entity)
 {
     if (!(entity == null))
     {
         service.Delete(entity);
     }
 }
예제 #2
0
        //public List<OperationalPlanEntity> GetList()
        //{
        //    return service.IQueryable().ToList();
        //}

        public OperationalPlanEntity GetForm(string keyValue)
        {
            OperationalPlanEntity Entity = new OperationalPlanEntity();

            Entity = service.FindEntity(keyValue);
            //Entity.OperationalPlanEquipEntryEntityList = equipentryApp.GetList(keyValue);
            //Entity.OperationalPlanPartsEntryEntityList = partsentryApp.GetList(keyValue);
            return(Entity);
        }
예제 #3
0
        public void SubmitForm(OperationalPlanEntity headEntity, List <OperationalPlanEquipEntryEntity> entitylist)
        {
            if (entitylist.Count > 0)
            {
                foreach (OperationalPlanEquipEntryEntity Entity in entitylist)
                {
                    Entity.FItemId = headEntity.FId;
                    Entity.Create();
                }

                service.Insert(entitylist);
            }
        }
예제 #4
0
        public void SubmitForm(OperationalPlanEntity entity, string keyValue)
        {
            var Entity = this.GetForm(keyValue);

            if (!(Entity == null))
            {
                entity.Modify(keyValue);
                service.Update(entity);
            }
            else
            {
                entity.BillHeadCreate();
                entity.UnCheck();
                entity.UnCancel();
                service.Insert(entity);
            }
        }
        public ActionResult SubmitForm(string dataHead, string dataEquipEntry, string dataPartsEntry)
        {
            OperationalPlanEntity headEntity = new OperationalPlanEntity();
            List <OperationalPlanEquipEntryEntity> EquipEntryList = new List <OperationalPlanEquipEntryEntity>();
            List <OperationalPlanPartsEntryEntity> PartsEntryList = new List <OperationalPlanPartsEntryEntity>();

            headEntity     = EquipManage.Code.Json.ToObject <OperationalPlanEntity>(dataHead);
            EquipEntryList = EquipManage.Code.Json.ToList <OperationalPlanEquipEntryEntity>(dataEquipEntry);
            PartsEntryList = EquipManage.Code.Json.ToList <OperationalPlanPartsEntryEntity>(dataPartsEntry);

            operationalPlanApp.Delete(operationalPlanApp.GetForm(headEntity.FId));
            operationalPlanApp.SubmitForm(headEntity, headEntity == null ? "" : headEntity.FId);
            //operationalPlanEquipEntryApp.Delete(headEntity.FId);
            operationalPlanEquipEntryApp.SubmitForm(headEntity, EquipEntryList);
            //operationalPlanPartsEntryApp.Delete(headEntity.FId);
            operationalPlanPartsEntryApp.SubmitForm(headEntity, PartsEntryList);

            return(Success("操作成功。"));
        }
예제 #6
0
        public bool CheckForm(OperationalPlanEntity entity, bool FIfCheck)
        {
            bool result = false;

            if (!(entity == null))
            {
                if (FIfCheck)
                {
                    entity.Check();
                }
                else
                {
                    entity.UnCheck();
                }
                if (service.Update(entity) > 0)
                {
                    result = true;
                }
            }
            return(result);
        }