예제 #1
0
        private object[] UpdateMaster(EPlanilla entity)
        {
            IDOUpdate objDO = new RHDOMnt.Planilla();

            if (entity.EntityState == EntityState.Unchanged)
                return null;

            object[] objRet = null;

            switch (entity.EntityState)
            {

                case EntityState.Added:
                    objRet = objDO.Insert(entity);
                    break;

                case EntityState.Modified:
                    if (entity.StAnulado == ConstFlagEstado.DESACTIVADO)
                        objDO.Update(entity);
                    else
                        objDO.Delete(entity);
                    break;

                case EntityState.Deleted:
                    objDO.Delete(entity);
                    break;

            }

            return objRet;
        }
예제 #2
0
        private void DeleteMaster(EPlanilla entity)
        {
            IDOUpdate objDO = new RHDOMnt.Planilla();

            if (entity.EntityState == EntityState.Unchanged)
                return;

            objDO.Delete(entity);
        }